@@ -41,7 +41,7 @@ private static void ResetToSequence(SegmentedArray<IntPtr> array)
41
41
public void TestDefaultInstance ( )
42
42
{
43
43
var data = default ( SegmentedArray < IntPtr > ) ;
44
- Assert . Null ( data . GetTestAccessor ( ) . Items ) ;
44
+ Assert . Null ( SegmentedCollectionsMarshal . AsSegments ( data ) ) ;
45
45
46
46
Assert . True ( data . IsFixedSize ) ;
47
47
Assert . True ( data . IsReadOnly ) ;
@@ -96,7 +96,7 @@ public void TestConstructor1()
96
96
Assert . Throws < ArgumentOutOfRangeException > ( "length" , ( ) => new SegmentedArray < byte > ( - 1 ) ) ;
97
97
98
98
Assert . Empty ( new SegmentedArray < byte > ( 0 ) ) ;
99
- Assert . Same ( Array . Empty < byte [ ] > ( ) , new SegmentedArray < byte > ( 0 ) . GetTestAccessor ( ) . Items ) ;
99
+ Assert . Same ( Array . Empty < byte [ ] > ( ) , SegmentedCollectionsMarshal . AsSegments ( new SegmentedArray < byte > ( 0 ) ) ) ;
100
100
}
101
101
102
102
[ Theory ]
@@ -106,7 +106,7 @@ public void TestConstructor2(int length)
106
106
var data = new SegmentedArray < IntPtr > ( length ) ;
107
107
Assert . Equal ( length , data . Length ) ;
108
108
109
- var items = data . GetTestAccessor ( ) . Items ;
109
+ var items = SegmentedCollectionsMarshal . AsSegments ( data ) ;
110
110
Assert . Equal ( length , items . Sum ( item => item . Length ) ) ;
111
111
112
112
for ( var i = 0 ; i < items . Length - 1 ; i ++ )
@@ -126,7 +126,7 @@ public void TestBasicProperties(int length)
126
126
Assert . True ( data . IsReadOnly ) ;
127
127
Assert . False ( data . IsSynchronized ) ;
128
128
Assert . Equal ( length , data . Length ) ;
129
- Assert . Same ( data . GetTestAccessor ( ) . Items , data . SyncRoot ) ;
129
+ Assert . Same ( SegmentedCollectionsMarshal . AsSegments ( data ) , data . SyncRoot ) ;
130
130
131
131
Assert . Equal ( length , ( ( ICollection ) data ) . Count ) ;
132
132
Assert . Equal ( length , ( ( ICollection < IntPtr > ) data ) . Count ) ;
@@ -192,7 +192,7 @@ public void TestIndexer(int length)
192
192
public void TestIterateLargeArray ( )
193
193
{
194
194
var data = new SegmentedArray < Guid > ( 1000000 ) ;
195
- Assert . True ( data . GetTestAccessor ( ) . Items . Length > 10 ) ;
195
+ Assert . True ( SegmentedCollectionsMarshal . AsSegments ( data ) . Length > 10 ) ;
196
196
197
197
for ( var i = 0 ; i < data . Length ; i ++ )
198
198
{
0 commit comments