@@ -85,7 +85,7 @@ public void Deserialize_should_not_throw_when_all_required_elements_present(
85
85
[ InlineData ( 1024 , 993 ) ]
86
86
[ InlineData ( 1024 , 1000 ) ]
87
87
[ InlineData ( 1024 , 1023 ) ]
88
- public void Deserialize_should_throw_FormatException_when_no_required_element_is_found ( int membersCount , int missingMemberIndex )
88
+ public void Deserialize_should_throw_FormatException_when_required_element_is_not_found ( int membersCount , int missingMemberIndex )
89
89
{
90
90
var subject = BuildTypeAndGetSerializer ( "Prop" , membersCount ) ;
91
91
var properties = Enumerable
@@ -197,19 +197,19 @@ public void Equals_with_not_equal_field_should_return_false()
197
197
[ InlineData ( 33 , 2 , true ) ]
198
198
[ InlineData ( 256 , 8 , true ) ]
199
199
[ InlineData ( 257 , 9 , false ) ]
200
- public void FastMemberMapHelper_GetBitArrayLength_should_return_correctValue ( int memberCount , int expectedBitArrayLength , bool expectedUseStackAlloc )
200
+ public void FastMemberMapHelper_GetMembersBitArrayLength_should_return_correctValue ( int memberCount , int expectedBitArrayLength , bool expectedUseStackAlloc )
201
201
{
202
- var ( bitArrayLength , useStackAlloc ) = BsonClassMapSerializer < MyModel > . FastMemberMapHelper . GetBitArrayLength ( memberCount ) ;
202
+ var ( bitArrayLength , useStackAlloc ) = BsonClassMapSerializer < MyModel > . FastMemberMapHelper . GetMembersBitArrayLength ( memberCount ) ;
203
203
204
204
bitArrayLength . ShouldBeEquivalentTo ( expectedBitArrayLength ) ;
205
205
useStackAlloc . ShouldBeEquivalentTo ( expectedUseStackAlloc ) ;
206
206
}
207
207
208
208
[ Fact ]
209
- public void FastMemberMapHelper_GetBitArray_with_span_should_use_the_provided_span ( )
209
+ public void FastMemberMapHelper_GetMembersBitArray_with_span_should_use_the_provided_span ( )
210
210
{
211
211
var backingArray = new uint [ ] { 1 , 2 , 3 } ;
212
- using var bitArray = BsonClassMapSerializer < MyModel > . FastMemberMapHelper . GetBitArray ( backingArray ) ;
212
+ using var bitArray = BsonClassMapSerializer < MyModel > . FastMemberMapHelper . GetMembersBitArray ( backingArray ) ;
213
213
214
214
bitArray . Span . ToArray ( ) . ShouldBeEquivalentTo ( new uint [ ] { 0 , 0 , 0 } ) ;
215
215
bitArray . ArrayPool . Should ( ) . Be ( null ) ;
@@ -221,9 +221,9 @@ public void FastMemberMapHelper_GetBitArray_with_span_should_use_the_provided_sp
221
221
[ Theory ]
222
222
[ InlineData ( 3 ) ]
223
223
[ InlineData ( 25 ) ]
224
- public void FastMemberMapHelper_GetBitArray_with_length_should_allocate_span ( int length )
224
+ public void FastMemberMapHelper_GetMembersBitArray_with_length_should_allocate_span ( int length )
225
225
{
226
- using var bitArray = BsonClassMapSerializer < MyModel > . FastMemberMapHelper . GetBitArray ( length ) ;
226
+ using var bitArray = BsonClassMapSerializer < MyModel > . FastMemberMapHelper . GetMembersBitArray ( length ) ;
227
227
228
228
bitArray . Span . ToArray ( ) . ShouldBeEquivalentTo ( Enumerable . Repeat < uint > ( 0 , length ) ) ;
229
229
bitArray . ArrayPool . Should ( ) . Be ( ArrayPool < uint > . Shared ) ;
@@ -232,12 +232,12 @@ public void FastMemberMapHelper_GetBitArray_with_length_should_allocate_span(int
232
232
[ Theory ]
233
233
[ InlineData ( 1 ) ]
234
234
[ InlineData ( 2 ) ]
235
- public void FastMemberMapHelper_BitArray_with_arraypool_should_dispose_only_once ( int disposeCount )
235
+ public void FastMemberMapHelper_MembersBitArray_with_arraypool_should_dispose_only_once ( int disposeCount )
236
236
{
237
237
var backingArray = new uint [ ] { 1 , 2 , 3 } ;
238
238
239
239
var mockArrayPool = new Mock < ArrayPool < uint > > ( ) ;
240
- var bitArray = new BsonClassMapSerializer < MyModel > . FastMemberMapHelper . BitArray ( backingArray . Length , backingArray , mockArrayPool . Object ) ;
240
+ var bitArray = new BsonClassMapSerializer < MyModel > . FastMemberMapHelper . MembersBitArray ( backingArray . Length , backingArray , mockArrayPool . Object ) ;
241
241
242
242
for ( int i = 0 ; i < disposeCount ; i ++ )
243
243
{
@@ -255,10 +255,10 @@ public void FastMemberMapHelper_BitArray_with_arraypool_should_dispose_only_once
255
255
[ InlineData ( 266 , 255 ) ]
256
256
[ InlineData ( 544 , 0 ) ]
257
257
[ InlineData ( 621 , 255 ) ]
258
- public void FastMemberMapHelper_GetBitArray_SetMemberIndex_should_set_correct_bit ( int membersCount , int memberIndex )
258
+ public void FastMemberMapHelper_GetMembersBitArray_SetMemberIndex_should_set_correct_bit ( int membersCount , int memberIndex )
259
259
{
260
- var ( length , _) = BsonClassMapSerializer < MyModel > . FastMemberMapHelper . GetBitArrayLength ( membersCount ) ;
261
- using var bitArray = BsonClassMapSerializer < MyModel > . FastMemberMapHelper . GetBitArray ( length ) ;
260
+ var ( length , _) = BsonClassMapSerializer < MyModel > . FastMemberMapHelper . GetMembersBitArrayLength ( membersCount ) ;
261
+ using var bitArray = BsonClassMapSerializer < MyModel > . FastMemberMapHelper . GetMembersBitArray ( length ) ;
262
262
263
263
var span = bitArray . Span ;
264
264
var blockIndex = memberIndex >> 5 ;
0 commit comments