mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-05 08:32:58 +00:00
Tests: new nil exception test for CPDictionary.
This commit is contained in:
1 parent
c7770c37d0
commit
d39bcfb7bd
1 file changed
+8
-1
@@ -419,7 +419,7 @@
|
||||
|
||||
- (void)testInitWithObjectsAndKeys
|
||||
{
|
||||
var dict = [[CPDictionary alloc] initWithObjectsAndKeys:@"Value1", @"Key1", nil, @"Key2", @"Value3", @"Key3"];
|
||||
var dict = [[CPDictionary alloc] initWithObjectsAndKeys:@"Value1", @"Key1", @"Value3", @"Key3"];
|
||||
|
||||
[self assert:2 equals:[dict count]];
|
||||
[self assert:@"Value1" equals:[dict objectForKey:@"Key1"]];
|
||||
@@ -427,6 +427,13 @@
|
||||
[self assert:@"Value3" equals:[dict objectForKey:@"Key3"]];
|
||||
}
|
||||
|
||||
- (void)testInitWithObjectsAndKeysAndNilValueShouldThrowException
|
||||
{
|
||||
[self assertThrows:function () {
|
||||
[[CPDictionary alloc] initWithObjectsAndKeys:@"Value1", @"Key1", nil, @"Key2", @"Value3", @"Key3"]
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)testDictionaryLiteral
|
||||
{
|
||||
var dict = @{
|
||||
|
||||
Reference in new issue
Block a user