make tests pass on os-x 14.5

This commit is contained in:
Richard Frith-Macdonald 2024-07-17 11:32:52 +01:00
parent 1a1e7f7fc5
commit a0a62fbde4
4 changed files with 12 additions and 6 deletions

View file

@ -25,10 +25,12 @@ int main()
[obj setObject: val1 forKey: @"Key1"];
PASS([obj count] == 1, "-setObject:forKey increments count");
[obj setObject: nil forKey: @"Key2"];
PASS([obj count] == 2, "-setObject:forKey: works with nil value");
PASS_EXCEPTION([obj setObject: val1 forKey: nil];,
NSInvalidArgumentException, "-setObject:forKey: raises with nil key");
PASS_RUNS([obj setObject: nil forKey: @"Key2"],
"-setObject:forKey: accepts nil value");
PASS([obj count] == 1, "-setObject:forKey: is no-op with nil value");
PASS_RUNS([obj setObject: val1 forKey: nil],
"-setObject:forKey: accepts nil key");
PASS([obj count] == 1, "-setObject:forKey: is no-op with nil key");
[arp release]; arp = nil;
return 0;