ObjFW  Diff

Differences From Artifact [b3dcaccc4e]:

To Artifact [c47931a3b5]:


19
20
21
22
23
24
25

26
27
28
29
30
31
32
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33







+







#import "OFDictionary.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFNumber.h"
#import "OFAutoreleasePool.h"

#import "OFEnumerationMutationException.h"
#import "OFUndefinedKeyException.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFDictionary";
static OFString *keys[] = {
	@"key1",
	@"key2"
55
56
57
58
59
60
61




62
63
64
65
66
67
68
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73







+
+
+
+







	    [[dict objectForKey: keys[1]] isEqual: values[1]] &&
	    [dict objectForKey: @"key3"] == nil)

	TEST(@"-[valueForKey:]",
	    [[dict valueForKey: keys[0]] isEqual: values[0]] &&
	    [[dict valueForKey: @"@count"] isEqual:
	    [OFNumber numberWithSize: 2]])

	EXPECT_EXCEPTION(@"Catching -[setValue:forKey:] on immutable "
	    @"dictionary", OFUndefinedKeyException, [dict setValue: @"x"
							    forKey: @"x"])

	TEST(@"-[containsObject:]",
	    [dict containsObject: values[0]] &&
	    ![dict containsObject: @"nonexistant"])

	TEST(@"-[containsObjectIdenticalTo:]",
	    [dict containsObjectIdenticalTo: values[0]] &&