@@ -29,8 +29,10 @@ class TypeUtilsSuite extends SparkFunSuite {
29
29
assert(compareDoubles(0 , 1 ) === 1 )
30
30
assert(compareDoubles(Double .MinValue , Double .MaxValue ) === 1 )
31
31
assert(compareDoubles(Double .NaN , Double .NaN ) === 0 )
32
- assert(compareDoubles(Double .NaN , Double .PositiveInfinity ) === - 1 )
33
- assert(compareDoubles(Double .NaN , Double .NegativeInfinity ) === - 1 )
32
+ assert(compareDoubles(Double .NaN , Double .PositiveInfinity ) === 1 )
33
+ assert(compareDoubles(Double .NaN , Double .NegativeInfinity ) === 1 )
34
+ assert(compareDoubles(Double .PositiveInfinity , Double .NaN ) === - 1 )
35
+ assert(compareDoubles(Double .NegativeInfinity , Double .NaN ) === - 1 )
34
36
}
35
37
36
38
test(" compareFloats" ) {
@@ -39,7 +41,9 @@ class TypeUtilsSuite extends SparkFunSuite {
39
41
assert(compareFloats(0 , 1 ) === 1 )
40
42
assert(compareFloats(Float .MinValue , Float .MaxValue ) === 1 )
41
43
assert(compareFloats(Float .NaN , Float .NaN ) === 0 )
42
- assert(compareFloats(Float .NaN , Float .PositiveInfinity ) === - 1 )
43
- assert(compareFloats(Float .NaN , Float .NegativeInfinity ) === - 1 )
44
+ assert(compareFloats(Float .NaN , Float .PositiveInfinity ) === 1 )
45
+ assert(compareFloats(Float .NaN , Float .NegativeInfinity ) === 1 )
46
+ assert(compareFloats(Float .PositiveInfinity , Float .NaN ) === - 1 )
47
+ assert(compareFloats(Float .NegativeInfinity , Float .NaN ) === - 1 )
44
48
}
45
49
}
0 commit comments