ObjFW  Check-in [69a0cfcb13]

Overview
Comment:Make GCC happy again
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | objfwtest
Files: files | file ages | folders
SHA3-256: 69a0cfcb13506b5f9304b64c8f8b20ad2908616f2f98313cd610839607cd521d
User & Date: js on 2024-02-18 12:51:24
Other Links: branch diff | manifest | tags
Context
2024-02-18
13:53
Merge trunk into branch "objfwtest" check-in: 89869c188f user: js tags: objfwtest
12:51
Make GCC happy again check-in: 69a0cfcb13 user: js tags: objfwtest
12:49
Fix and enable -[OFDictionaryTests testHash] check-in: 7b21071996 user: js tags: objfwtest
Changes

Modified new_tests/OFDictionaryTests.m from [9cb3005942] to [49b4f5c917].

174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
	    ([first isEqual: objects[0]] && [second isEqual: objects[1]]) ||
	    ([first isEqual: objects[1]] && [second isEqual: objects[0]]));
}

- (void)testFastEnumeration
{
	size_t i = 0;
	OFString *first, *second;

	for (OFString *key in _dictionary) {
		OTAssertLessThan(i, 2);

		switch (i++) {
		case 0:
			first = key;







|







174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
	    ([first isEqual: objects[0]] && [second isEqual: objects[1]]) ||
	    ([first isEqual: objects[1]] && [second isEqual: objects[0]]));
}

- (void)testFastEnumeration
{
	size_t i = 0;
	OFString *first = nil, *second = nil;

	for (OFString *key in _dictionary) {
		OTAssertLessThan(i, 2);

		switch (i++) {
		case 0:
			first = key;
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
	    ([first isEqual: keys[1]] && [second isEqual: keys[0]]));
}

#ifdef OF_HAVE_BLOCKS
- (void)testEnumerateKeysAndObjectsUsingBlock
{
	__block size_t i = 0;
	__block OFString *first, *second;

	[_dictionary enumerateKeysAndObjectsUsingBlock:
	    ^ (id key, id object, bool *stop) {
		OTAssertLessThan(i, 2);

		switch (i++) {
		case 0:







|







199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
	    ([first isEqual: keys[1]] && [second isEqual: keys[0]]));
}

#ifdef OF_HAVE_BLOCKS
- (void)testEnumerateKeysAndObjectsUsingBlock
{
	__block size_t i = 0;
	__block OFString *first = nil, *second = nil;

	[_dictionary enumerateKeysAndObjectsUsingBlock:
	    ^ (id key, id object, bool *stop) {
		OTAssertLessThan(i, 2);

		switch (i++) {
		case 0: