mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 13:07:02 +00:00
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.
16 lines
274 B
Plaintext
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
|