@@ -9,38 +9,38 @@ public class KeyAnalyzerTests
99 [ Fact ]
1010 public void GetProperties_IsConsecutive_Test ( )
1111 {
12- Assert . True ( GetProperties < char > ( new [ ] { 'a' , 'b' , 'c' } ) . IsConsecutive ) ;
13- Assert . False ( GetProperties < char > ( new [ ] { 'a' , 'c' } ) . IsConsecutive ) ;
12+ Assert . True ( GetNumericProperties < char > ( new [ ] { 'a' , 'b' , 'c' } ) . IsConsecutive ) ;
13+ Assert . False ( GetNumericProperties < char > ( new [ ] { 'a' , 'c' } ) . IsConsecutive ) ;
1414
15- Assert . True ( GetProperties < sbyte > ( new sbyte [ ] { - 1 , 0 , 1 } ) . IsConsecutive ) ;
16- Assert . False ( GetProperties < sbyte > ( new sbyte [ ] { - 1 , 1 , 2 } ) . IsConsecutive ) ;
15+ Assert . True ( GetNumericProperties < sbyte > ( new sbyte [ ] { - 1 , 0 , 1 } ) . IsConsecutive ) ;
16+ Assert . False ( GetNumericProperties < sbyte > ( new sbyte [ ] { - 1 , 1 , 2 } ) . IsConsecutive ) ;
1717
18- Assert . True ( GetProperties < byte > ( new byte [ ] { 1 , 2 , 3 } ) . IsConsecutive ) ;
19- Assert . False ( GetProperties < byte > ( new byte [ ] { 1 , 3 , 4 } ) . IsConsecutive ) ;
18+ Assert . True ( GetNumericProperties < byte > ( new byte [ ] { 1 , 2 , 3 } ) . IsConsecutive ) ;
19+ Assert . False ( GetNumericProperties < byte > ( new byte [ ] { 1 , 3 , 4 } ) . IsConsecutive ) ;
2020
21- Assert . True ( GetProperties < short > ( new short [ ] { 10 , 11 , 12 } ) . IsConsecutive ) ;
22- Assert . False ( GetProperties < short > ( new short [ ] { 10 , 11 , 13 } ) . IsConsecutive ) ;
21+ Assert . True ( GetNumericProperties < short > ( new short [ ] { 10 , 11 , 12 } ) . IsConsecutive ) ;
22+ Assert . False ( GetNumericProperties < short > ( new short [ ] { 10 , 11 , 13 } ) . IsConsecutive ) ;
2323
24- Assert . True ( GetProperties < ushort > ( new ushort [ ] { 10 , 11 , 12 } ) . IsConsecutive ) ;
25- Assert . False ( GetProperties < ushort > ( new ushort [ ] { 10 , 11 , 13 } ) . IsConsecutive ) ;
24+ Assert . True ( GetNumericProperties < ushort > ( new ushort [ ] { 10 , 11 , 12 } ) . IsConsecutive ) ;
25+ Assert . False ( GetNumericProperties < ushort > ( new ushort [ ] { 10 , 11 , 13 } ) . IsConsecutive ) ;
2626
27- Assert . True ( GetProperties < int > ( new [ ] { 100 , 101 } ) . IsConsecutive ) ;
28- Assert . False ( GetProperties < int > ( new [ ] { 100 , 102 } ) . IsConsecutive ) ;
27+ Assert . True ( GetNumericProperties < int > ( new [ ] { 100 , 101 } ) . IsConsecutive ) ;
28+ Assert . False ( GetNumericProperties < int > ( new [ ] { 100 , 102 } ) . IsConsecutive ) ;
2929
30- Assert . True ( GetProperties < uint > ( new [ ] { 100u , 101u } ) . IsConsecutive ) ;
31- Assert . False ( GetProperties < uint > ( new [ ] { 100u , 102u } ) . IsConsecutive ) ;
30+ Assert . True ( GetNumericProperties < uint > ( new [ ] { 100u , 101u } ) . IsConsecutive ) ;
31+ Assert . False ( GetNumericProperties < uint > ( new [ ] { 100u , 102u } ) . IsConsecutive ) ;
3232
33- Assert . True ( GetProperties < long > ( new [ ] { long . MaxValue - 2 , long . MaxValue - 1 , long . MaxValue } ) . IsConsecutive ) ;
34- Assert . False ( GetProperties < long > ( new [ ] { 1L , 3L , 4L } ) . IsConsecutive ) ;
33+ Assert . True ( GetNumericProperties < long > ( new [ ] { long . MaxValue - 2 , long . MaxValue - 1 , long . MaxValue } ) . IsConsecutive ) ;
34+ Assert . False ( GetNumericProperties < long > ( new [ ] { 1L , 3L , 4L } ) . IsConsecutive ) ;
3535
36- Assert . True ( GetProperties < ulong > ( new [ ] { 1ul , 2ul , 3ul } ) . IsConsecutive ) ;
37- Assert . False ( GetProperties < ulong > ( new [ ] { 1ul , 2ul , 4ul } ) . IsConsecutive ) ;
36+ Assert . True ( GetNumericProperties < ulong > ( new [ ] { 1ul , 2ul , 3ul } ) . IsConsecutive ) ;
37+ Assert . False ( GetNumericProperties < ulong > ( new [ ] { 1ul , 2ul , 4ul } ) . IsConsecutive ) ;
3838
39- Assert . True ( GetProperties < float > ( new [ ] { 0.5f , 1.5f , 2.5f } ) . IsConsecutive ) ;
40- Assert . False ( GetProperties < float > ( new [ ] { 0f , 0.9f , 2f } ) . IsConsecutive ) ;
39+ Assert . True ( GetNumericProperties < float > ( new [ ] { 0.5f , 1.5f , 2.5f } ) . IsConsecutive ) ;
40+ Assert . False ( GetNumericProperties < float > ( new [ ] { 0f , 0.9f , 2f } ) . IsConsecutive ) ;
4141
42- Assert . True ( GetProperties < double > ( new [ ] { 0.5d , 1.5d , 2.5d } ) . IsConsecutive ) ;
43- Assert . False ( GetProperties < double > ( new [ ] { 0d , 0.9d , 2d } ) . IsConsecutive ) ;
42+ Assert . True ( GetNumericProperties < double > ( new [ ] { 0.5d , 1.5d , 2.5d } ) . IsConsecutive ) ;
43+ Assert . False ( GetNumericProperties < double > ( new [ ] { 0d , 0.9d , 2d } ) . IsConsecutive ) ;
4444 }
4545
4646 [ Theory ]
@@ -51,7 +51,7 @@ public void GetProperties_IsConsecutive_Test()
5151 [ InlineData ( ( object ) new [ ] { "a" , "a" , "aaa" , "aaa" } ) ] //Test duplicates
5252 public void GetStringProperties_LengthMap_Test ( string [ ] data )
5353 {
54- StringProperties res = GetStringProperties ( data , false ) ;
54+ StringKeyProperties res = GetStringProperties ( data , false ) ;
5555 LengthBitArray map = res . LengthData . LengthMap ;
5656 Assert . Equal ( data . Distinct ( ) . Count ( ) , map . BitCount ) ;
5757
@@ -72,7 +72,7 @@ public void GetStringProperties_LengthMap_Test(string[] data)
7272 [ InlineData ( new [ ] { "hello world" } , 0 , 0 ) ] // One key should result in no prefix/suffix calculation
7373 public void GetStringProperties_DeltaData_Test ( string [ ] data , int leftZero , int rightZero )
7474 {
75- StringProperties res = GetStringProperties ( data , true ) ;
75+ StringKeyProperties res = GetStringProperties ( data , true ) ;
7676 Assert . Equal ( leftZero , res . DeltaData . LeftZeroCount ) ;
7777 Assert . Equal ( rightZero , res . DeltaData . RightZeroCount ) ;
7878 }
0 commit comments