add tests for removal of a default directly and via -setObject:forKey:

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34138 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-11-09 13:51:55 +00:00
parent b2b57f1610
commit f539c1aba4

View file

@ -53,6 +53,14 @@ int main()
PASS([[defs stringForKey: @"Test Suite Str"] isEqual: @"SetString"],
"NSUserDefaults can set/get a string");
[defs removeObjectForKey: @"Test Suite Bool"];
PASS(nil == [defs objectForKey: @"Test Suite Bool"],
"NSUserDefaults can use -removeObjectForKey: to remove a bool");
[defs setObject: nil forKey: @"Test Suite Int"];
PASS(nil == [defs objectForKey: @"Test Suite Int"],
"NSUserDefaults can use -setObject:forKey: to remove an int");
[arp release]; arp = nil;
return 0;
}