File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,12 @@ mod test {
202
202
use qc:: { U32 , U64 } ;
203
203
use float:: Float ;
204
204
205
+ // NOTE The tests below have special handing for NaN values.
206
+ // Because NaN != NaN, the floating-point representations must be used
207
+ // Because there are many diffferent values of NaN, and the implementation
208
+ // doesn't care about calculating the 'correct' one, if both values are NaN
209
+ // the values are considered equivalent.
210
+
205
211
// TODO: Add F32/F64 to qc so that they print the right values (at the very least)
206
212
quickcheck ! {
207
213
fn addsf3( a: U32 , b: U32 ) -> bool {
@@ -305,14 +311,12 @@ mod test {
305
311
#[ test]
306
312
fn test_float_nan ( ) {
307
313
let r = super :: __addsf3 ( f32:: NAN , 1.23 ) ;
308
- // Need .repr() since NAN != NAN
309
314
assert_eq ! ( r. repr( ) , f32 :: NAN . repr( ) ) ;
310
315
}
311
316
312
317
#[ test]
313
318
fn test_double_nan ( ) {
314
319
let r = super :: __adddf3 ( f64:: NAN , 1.23 ) ;
315
- // Need .repr() since NAN != NAN
316
320
assert_eq ! ( r. repr( ) , f64 :: NAN . repr( ) ) ;
317
321
}
318
322
You can’t perform that action at this time.
0 commit comments