mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-14 14:41:28 +00:00
Tests: new nil exception test for CPDictionary.
This commit is contained in:
@@ -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