Differences From Artifact [9cb3005942]:
- File
new_tests/OFDictionaryTests.m
— part of check-in
[7b21071996]
at
2024-02-18 12:49:08
on branch objfwtest
— Fix and enable -[OFDictionaryTests testHash]
The hash was stable after all, the problem was that everything gets
XOR'd together and thus a dictionary with the objects for keys and keys
for objects has the same hash. (user: js, size: 6328) [annotate] [blame] [check-ins using]
To Artifact [49b4f5c917]:
- File new_tests/OFDictionaryTests.m — part of check-in [69a0cfcb13] at 2024-02-18 12:51:24 on branch objfwtest — Make GCC happy again (user: js, size: 6352) [annotate] [blame] [check-ins using]
- File tests/OFDictionaryTests.m — part of check-in [7a84580fb6] at 2024-02-18 19:29:26 on branch objfwtest — Rename new tests (user: js, size: 6352) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
174 175 176 177 178 179 180 | ([first isEqual: objects[0]] && [second isEqual: objects[1]]) || ([first isEqual: objects[1]] && [second isEqual: objects[0]])); } - (void)testFastEnumeration { size_t i = 0; | | | 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 | ([first isEqual: keys[1]] && [second isEqual: keys[0]])); } #ifdef OF_HAVE_BLOCKS - (void)testEnumerateKeysAndObjectsUsingBlock { __block size_t i = 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: |
︙ | ︙ |