47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
TEST(@"-[isEqual:]", [set1 isEqual: set2])
TEST(@"-[hash]", [set1 hash] == [set2 hash])
TEST(@"-[description]",
[[set1 description]
isEqual: @"{(\n\tfoo,\n\tbaz,\n\tx,\n\tbar\n)}"] &&
[[set1 description] isEqual: [set2 description]])
TEST(@"-[copy]", [set1 isEqual: [[set1 copy] autorelease]])
TEST(@"-[mutableCopy]",
(mutableSet = [[set1 mutableCopy] autorelease]));
|
|
|
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
TEST(@"-[isEqual:]", [set1 isEqual: set2])
TEST(@"-[hash]", [set1 hash] == [set2 hash])
TEST(@"-[description]",
[[set1 description]
isEqual: @"{(\n\tx,\n\tbar,\n\tfoo,\n\tbaz\n)}"] &&
[[set1 description] isEqual: [set2 description]])
TEST(@"-[copy]", [set1 isEqual: [[set1 copy] autorelease]])
TEST(@"-[mutableCopy]",
(mutableSet = [[set1 mutableCopy] autorelease]));
|
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
#ifdef OF_HAVE_FAST_ENUMERATION
ok = YES;
i = 0;
for (OFString *s in set1) {
switch (i) {
case 0:
if (![s isEqual: @"foo"])
ok = NO;
break;
case 1:
if (![s isEqual: @"baz"])
ok = NO;
break;
case 2:
if (![s isEqual: @"x"])
ok = NO;
break;
case 3:
if (![s isEqual: @"bar"])
ok = NO;
break;
}
i++;
}
|
|
|
|
|
|
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
#ifdef OF_HAVE_FAST_ENUMERATION
ok = YES;
i = 0;
for (OFString *s in set1) {
switch (i) {
case 0:
if (![s isEqual: @"x"])
ok = NO;
break;
case 1:
if (![s isEqual: @"bar"])
ok = NO;
break;
case 2:
if (![s isEqual: @"foo"])
ok = NO;
break;
case 3:
if (![s isEqual: @"baz"])
ok = NO;
break;
}
i++;
}
|