ObjFW  Diff

Differences From Artifact [95c48806f0]:

To Artifact [c4671d9ef0]:


131
132
133
134
135
136
137





138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166





167
168
169
170
171
172
	x = [OFArray arrayWithItemSize: 1];
	y = [OFArray bigArrayWithItemSize: 1];

	if (![x isEqual: y]) {
		puts("FAIL 1!");
		return 1;
	}






	[x add: "x"];
	if ([x isEqual: y]) {
		puts("FAIL 2!");
		return 2;
	}
	[pool releaseObjects];

	x = [OFArray arrayWithItemSize: 2];
	y = [OFArray bigArrayWithItemSize: 4];

	if ([x isEqual: y]) {
		puts("FAIL 3!");
		return 1;
	}
	[pool releaseObjects];

	x = [OFArray arrayWithItemSize: 1];
	[x addNItems: 3
	  fromCArray: "abc"];
	y = [x copy];
	if ([x compare: y]) {
		puts("FAIL 4!");
		return 1;
	}

	[y add: "de"];
	if ([x compare: y] != -100) {
		puts("FAIL 5!");





		return 1;
	}
	[pool release];

	return 0;
}







>
>
>
>
>



|
|







|









|





|
>
>
>
>
>






131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
	x = [OFArray arrayWithItemSize: 1];
	y = [OFArray bigArrayWithItemSize: 1];

	if (![x isEqual: y]) {
		puts("FAIL 1!");
		return 1;
	}

	if ([x hash] != [y hash]) {
		puts("FAIL 2!");
		return 1;
	}

	[x add: "x"];
	if ([x isEqual: y]) {
		puts("FAIL 3!");
		return 1;
	}
	[pool releaseObjects];

	x = [OFArray arrayWithItemSize: 2];
	y = [OFArray bigArrayWithItemSize: 4];

	if ([x isEqual: y]) {
		puts("FAIL 4!");
		return 1;
	}
	[pool releaseObjects];

	x = [OFArray arrayWithItemSize: 1];
	[x addNItems: 3
	  fromCArray: "abc"];
	y = [x copy];
	if ([x compare: y]) {
		puts("FAIL 5!");
		return 1;
	}

	[y add: "de"];
	if ([x compare: y] != -100) {
		puts("FAIL 6!");
		return 1;
	}

	if ([y hash] != 0xCD8B6206) {
		puts("FAIL 7!");
		return 1;
	}
	[pool release];

	return 0;
}