Files
cappuccino/Tests/Foundation/CPNumberTest.j
T
Alexander Ljungberg 0f53ceda30 Fixed: comparing a CPNumber vs nil or CPNull didn't throw an exception.
In Objective-C, both `[@34 compare:nil]` and `[@34 compare:[CPNull null]]` throw invalid argument exceptions.

This fix makes the same true in Objective-J.

Refs #1959.
2013-07-15 10:47:38 +01:00

16 lines
274 B
Plaintext

@import <Foundation/CPNumber.j>
@implementation CPNumberTest : OJTestCase
- (void)testCompareWithNil
{
[self assertThrows:function () { [34 compare:nil] }];
}
- (void)testCompareWithCPNull
{
[self assertThrows:function () { [34 compare:[CPNull null]] }];
}
@end