ObjFW  Diff

Differences From Artifact [104e780811]:

To Artifact [601d8ce9b6]:


86
87
88
89
90
91
92




93
94
95
96
97
98
99
	    nil]])

	TEST(@"-[unionSet:]",
	    R([mutableSet unionSet: [OFSet setWithObjects: @"x", @"bar",
	    nil]]) && [mutableSet isEqual: [OFSet setWithObjects: @"baz",
	    @"bar", @"x", nil]])





	ok = true;
	i = 0;

	for (OFString *s in set1) {
		switch (i) {
		case 0:
			if (![s isEqual: @"x"])







>
>
>
>







86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
	    nil]])

	TEST(@"-[unionSet:]",
	    R([mutableSet unionSet: [OFSet setWithObjects: @"x", @"bar",
	    nil]]) && [mutableSet isEqual: [OFSet setWithObjects: @"baz",
	    @"bar", @"x", nil]])

	TEST(@"-[removeAllObjects]",
	    R([mutableSet removeAllObjects]) &&
	    [mutableSet isEqual: [OFSet set]])

	ok = true;
	i = 0;

	for (OFString *s in set1) {
		switch (i) {
		case 0:
			if (![s isEqual: @"x"])
118
119
120
121
122
123
124


125
126
127
128
129
130
131

	if (i != 4)
		ok = false;

	TEST(@"Fast enumeration", ok)

	ok = false;


	@try {
		for (OFString *s in mutableSet)
			[mutableSet removeObject: s];
	} @catch (OFEnumerationMutationException *e) {
		ok = true;
	}








>
>







122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137

	if (i != 4)
		ok = false;

	TEST(@"Fast enumeration", ok)

	ok = false;
	[mutableSet addObject: @"foo"];
	[mutableSet addObject: @"bar"];
	@try {
		for (OFString *s in mutableSet)
			[mutableSet removeObject: s];
	} @catch (OFEnumerationMutationException *e) {
		ok = true;
	}