Differences From Artifact [b592578265]:
- File new_tests/OFDictionaryTests.m — part of check-in [728cc47880] at 2024-02-18 12:34:55 on branch objfwtest — Migrate OFDictionaryTests to ObjFWTest (user: js, size: 6435) [annotate] [blame] [check-ins using]
To 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]
︙ | ︙ | |||
73 74 75 76 77 78 79 | count: 2]); OTAssertNotEqualObjects(_dictionary, [OFDictionary dictionaryWithObjects: keys forKeys: objects count: 2]); } | < < | < | < | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | count: 2]); OTAssertNotEqualObjects(_dictionary, [OFDictionary dictionaryWithObjects: keys forKeys: objects count: 2]); } - (void)testHash { OTAssertEqual(_dictionary.hash, [[OFDictionary dictionaryWithObjects: objects forKeys: keys count: 2] hash]); OTAssertNotEqual(_dictionary.hash, [[OFDictionary dictionaryWithObject: objects[0] forKey: keys[0]] hash]); } - (void)testCopy { OTAssertEqualObjects([[_dictionary copy] autorelease], _dictionary); } - (void)testValueForKey |
︙ | ︙ |