diff --git a/Tests/base/NSNumber/test01.m b/Tests/base/NSNumber/test01.m index d0c5d4de7e..2814c803b1 100644 --- a/Tests/base/NSNumber/test01.m +++ b/Tests/base/NSNumber/test01.m @@ -22,6 +22,17 @@ int main() START_SET("NSNumber") NSNumber *n; + START_SET("simple-number checks") + NSNumber *nn = [NSNumber numberWithFloat: 42.0]; + + n = [NSNumber numberWithFloat: M_PI]; + PASS([nn compare: n] == NSOrderedDescending, "42 is greater than pi") + PASS([n compare: nn] == NSOrderedAscending, "pi is smaller than 42") + PASS([n compare: n] == NSOrderedSame, "pi is pi") + PASS([nn compare: nn] == NSOrderedSame, "42 is 42") + + END_SET("simple-number checks") + START_SET("not-a-number checks") NSNumber *nan = [NSDecimalNumber notANumber];