@@ -45,6 +45,24 @@ static void NIntTest (StringBuilder output)
45
45
if ( n . ToLong ( 42 ) != 42 ) {
46
46
output . AppendLine ( "nint conversion failure" ) ;
47
47
}
48
+ if ( n . Less ( 4 , 3 ) ) {
49
+ output . AppendLine ( "nint less failure (0)" ) ;
50
+ }
51
+ if ( n . Less ( 2 , 2 ) ) {
52
+ output . AppendLine ( "nint less failure (1)" ) ;
53
+ }
54
+ if ( ! n . Less ( 2 , 3 ) ) {
55
+ output . AppendLine ( "nint less failure (2)" ) ;
56
+ }
57
+ if ( ! n . Greater ( 4 , 3 ) ) {
58
+ output . AppendLine ( "nint greater failure (0)" ) ;
59
+ }
60
+ if ( n . Greater ( 2 , 2 ) ) {
61
+ output . AppendLine ( "nint greater failure (1)" ) ;
62
+ }
63
+ if ( n . Greater ( 2 , 3 ) ) {
64
+ output . AppendLine ( "nint greater failure (2)" ) ;
65
+ }
48
66
}
49
67
50
68
static void NUIntTest ( StringBuilder output )
@@ -71,6 +89,33 @@ static void NUIntTest (StringBuilder output)
71
89
if ( n . ToLong ( 42 ) != 42 ) {
72
90
output . AppendLine ( "nuint conversion failure" ) ;
73
91
}
92
+ if ( n . Less ( 4 , 3 ) ) {
93
+ output . AppendLine ( "nuint less failure (0)" ) ;
94
+ }
95
+ if ( n . Less ( 2 , 2 ) ) {
96
+ output . AppendLine ( "nuint less failure (1)" ) ;
97
+ }
98
+ if ( ! n . Less ( 2 , 3 ) ) {
99
+ output . AppendLine ( "nuint less failure (2)" ) ;
100
+ }
101
+ if ( ! n . Greater ( 4 , 3 ) ) {
102
+ output . AppendLine ( "nuint greater failure (0)" ) ;
103
+ }
104
+ if ( n . Greater ( 2 , 2 ) ) {
105
+ output . AppendLine ( "nuint greater failure (1)" ) ;
106
+ }
107
+ if ( n . Greater ( 2 , 3 ) ) {
108
+ output . AppendLine ( "nuint greater failure (2)" ) ;
109
+ }
110
+ if ( n . Eq ( 4 , 3 ) ) {
111
+ output . AppendLine ( "nuint equal failure (0)" ) ;
112
+ }
113
+ if ( ! n . Eq ( 2 , 2 ) ) {
114
+ output . AppendLine ( "nuint equal failure (1)" ) ;
115
+ }
116
+ if ( n . Eq ( 2 , 3 ) ) {
117
+ output . AppendLine ( "nuint equal failure (2)" ) ;
118
+ }
74
119
}
75
120
76
121
static void NFloatTest ( StringBuilder output )
@@ -97,6 +142,33 @@ static void NFloatTest (StringBuilder output)
97
142
if ( n . ToDouble ( ( NFloat ) 42.0 ) != 42.0 ) {
98
143
output . AppendLine ( "nfloat conversion failure" ) ;
99
144
}
145
+ if ( n . Less ( ( NFloat ) 4.0 , ( NFloat ) 3.0 ) ) {
146
+ output . AppendLine ( "nfloat less failure (0)" ) ;
147
+ }
148
+ if ( n . Less ( ( NFloat ) 2.0 , ( NFloat ) 2.0 ) ) {
149
+ output . AppendLine ( "nfloat less failure (1)" ) ;
150
+ }
151
+ if ( ! n . Less ( ( NFloat ) 2.0 , ( NFloat ) 3.0 ) ) {
152
+ output . AppendLine ( "nfloat less failure (2)" ) ;
153
+ }
154
+ if ( ! n . Greater ( ( NFloat ) 4.0 , ( NFloat ) 3.0 ) ) {
155
+ output . AppendLine ( "nfloat greater failure (0)" ) ;
156
+ }
157
+ if ( n . Greater ( ( NFloat ) 2.0 , ( NFloat ) 2.0 ) ) {
158
+ output . AppendLine ( "nfloat greater failure (1)" ) ;
159
+ }
160
+ if ( n . Greater ( ( NFloat ) 2.0 , ( NFloat ) 3.0 ) ) {
161
+ output . AppendLine ( "nfloat greater failure (2)" ) ;
162
+ }
163
+ if ( n . Eq ( ( NFloat ) 4.0 , ( NFloat ) 3.0 ) ) {
164
+ output . AppendLine ( "nfloat equal failure (0)" ) ;
165
+ }
166
+ if ( ! n . Eq ( ( NFloat ) 2.0 , ( NFloat ) 2.0 ) ) {
167
+ output . AppendLine ( "nfloat equal failure (1)" ) ;
168
+ }
169
+ if ( n . Eq ( ( NFloat ) 2.0 , ( NFloat ) 3.0 ) ) {
170
+ output . AppendLine ( "nfloat equal failure (2)" ) ;
171
+ }
100
172
}
101
173
}
102
174
}
0 commit comments