@@ -16,50 +16,6 @@ public static void GetLowestBitPositionTest(ulong value, int expectedPosition)
16
16
Assert . True ( Bit . GetLowestPosition ( value ) == expectedPosition ) ;
17
17
}
18
18
19
- [ Fact ]
20
- public static void ByteBitwiseOperationsTest ( )
21
- {
22
- Assert . True ( Bit < byte > . Not ( 2 ) == unchecked ( ( byte ) ~ 2 ) ) ;
23
- Assert . True ( Bit < byte > . Or ( 1 , 2 ) == ( 1 | 2 ) ) ;
24
- Assert . True ( Bit < byte > . And ( 1 , 2 ) == ( 1 & 2 ) ) ;
25
- Assert . True ( Bit < byte > . ShiftLeft ( 1 , 2 ) == ( 1 << 2 ) ) ;
26
- Assert . True ( Bit < byte > . ShiftRight ( 1 , 2 ) == ( 1 >> 2 ) ) ;
27
- Assert . Equal ( NumericType < byte > . MaxValue >> 1 , Bit < byte > . ShiftRight ( NumericType < byte > . MaxValue , 1 ) ) ;
28
- }
29
-
30
- [ Fact ]
31
- public static void UInt16BitwiseOperationsTest ( )
32
- {
33
- Assert . True ( Bit < ushort > . Not ( 2 ) == unchecked ( ( ushort ) ~ 2 ) ) ;
34
- Assert . True ( Bit < ushort > . Or ( 1 , 2 ) == ( 1 | 2 ) ) ;
35
- Assert . True ( Bit < ushort > . And ( 1 , 2 ) == ( 1 & 2 ) ) ;
36
- Assert . True ( Bit < ushort > . ShiftLeft ( 1 , 2 ) == ( 1 << 2 ) ) ;
37
- Assert . True ( Bit < ushort > . ShiftRight ( 1 , 2 ) == ( 1 >> 2 ) ) ;
38
- Assert . Equal ( NumericType < ushort > . MaxValue >> 1 , Bit < ushort > . ShiftRight ( NumericType < ushort > . MaxValue , 1 ) ) ;
39
- }
40
-
41
- [ Fact ]
42
- public static void UInt32BitwiseOperationsTest ( )
43
- {
44
- Assert . True ( Bit < uint > . Not ( 2 ) == unchecked ( ( uint ) ~ 2 ) ) ;
45
- Assert . True ( Bit < uint > . Or ( 1 , 2 ) == ( 1 | 2 ) ) ;
46
- Assert . True ( Bit < uint > . And ( 1 , 2 ) == ( 1 & 2 ) ) ;
47
- Assert . True ( Bit < uint > . ShiftLeft ( 1 , 2 ) == ( 1 << 2 ) ) ;
48
- Assert . True ( Bit < uint > . ShiftRight ( 1 , 2 ) == ( 1 >> 2 ) ) ;
49
- Assert . Equal ( NumericType < uint > . MaxValue >> 1 , Bit < uint > . ShiftRight ( NumericType < uint > . MaxValue , 1 ) ) ;
50
- }
51
-
52
- [ Fact ]
53
- public static void UInt64BitwiseOperationsTest ( )
54
- {
55
- Assert . True ( Bit < ulong > . Not ( 2 ) == unchecked ( ( ulong ) ~ 2 ) ) ;
56
- Assert . True ( Bit < ulong > . Or ( 1 , 2 ) == ( 1 | 2 ) ) ;
57
- Assert . True ( Bit < ulong > . And ( 1 , 2 ) == ( 1 & 2 ) ) ;
58
- Assert . True ( Bit < ulong > . ShiftLeft ( 1 , 2 ) == ( 1 << 2 ) ) ;
59
- Assert . True ( Bit < ulong > . ShiftRight ( 1 , 2 ) == ( 1 >> 2 ) ) ;
60
- Assert . Equal ( NumericType < ulong > . MaxValue >> 1 , Bit < ulong > . ShiftRight ( NumericType < ulong > . MaxValue , 1 ) ) ;
61
- }
62
-
63
19
[ Fact ]
64
20
public static void PartialReadWriteTest ( )
65
21
{
@@ -104,17 +60,17 @@ public static void PartialReadWriteTest()
104
60
Assert . True ( secondValue == unpackagedSecondValue ) ;
105
61
106
62
// Using universal functions:
107
- Assert . True ( Bit . PartialRead ( value , 0 , 1 ) == firstValue ) ;
108
- Assert . True ( Bit . PartialRead ( value , 1 , - 1 ) == secondValue ) ;
63
+ Assert . True ( Bit < uint > . PartialRead ( value , 0 , 1 ) == firstValue ) ;
64
+ Assert . True ( Bit < uint > . PartialRead ( value , 1 , - 1 ) == secondValue ) ;
109
65
110
66
firstValue = 0 ;
111
67
secondValue = 6892 ;
112
68
113
- value = Bit . PartialWrite ( value , firstValue , 0 , 1 ) ;
114
- value = Bit . PartialWrite ( value , secondValue , 1 , - 1 ) ;
69
+ value = Bit < uint > . PartialWrite ( value , firstValue , 0 , 1 ) ;
70
+ value = Bit < uint > . PartialWrite ( value , secondValue , 1 , - 1 ) ;
115
71
116
- Assert . True ( Bit . PartialRead ( value , 0 , 1 ) == firstValue ) ;
117
- Assert . True ( Bit . PartialRead ( value , 1 , - 1 ) == secondValue ) ;
72
+ Assert . True ( Bit < uint > . PartialRead ( value , 0 , 1 ) == firstValue ) ;
73
+ Assert . True ( Bit < uint > . PartialRead ( value , 1 , - 1 ) == secondValue ) ;
118
74
}
119
75
120
76
{
0 commit comments