diff --git a/Tests/Foundation/CPDictionaryTest.j b/Tests/Foundation/CPDictionaryTest.j index f14dce9b0..5cdd75983 100644 --- a/Tests/Foundation/CPDictionaryTest.j +++ b/Tests/Foundation/CPDictionaryTest.j @@ -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 = @{