Differences From Artifact [bc3d5b4b0a]:
- File
tests/OFStringTests.m
— part of check-in
[b5a74319e1]
at
2021-04-07 19:22:20
on branch trunk
— OF{Data,String}+CryptoHashing: Rename methods
This makes it clearer that these return a string and not a hash object. (user: js, size: 54648) [annotate] [blame] [check-ins using] [more...]
To Artifact [43eafe635a]:
- File tests/OFStringTests.m — part of check-in [61fc389aee] at 2021-04-17 00:14:33 on branch new-naming-convention — of_comparison_result_t -> OFComparisonResult (user: js, size: 54616) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
231 232 233 234 235 236 237 | s[0] = [mutableStringClass stringWithString: @"täs€"]; s[1] = [mutableStringClass string]; s[2] = [[s[0] copy] autorelease]; TEST(@"-[isEqual:]", [s[0] isEqual: s[2]] && ![s[0] isEqual: [[[OFObject alloc] init] autorelease]]) | | | | | | | | | | | | | | | | | | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | s[0] = [mutableStringClass stringWithString: @"täs€"]; s[1] = [mutableStringClass string]; s[2] = [[s[0] copy] autorelease]; TEST(@"-[isEqual:]", [s[0] isEqual: s[2]] && ![s[0] isEqual: [[[OFObject alloc] init] autorelease]]) TEST(@"-[compare:]", [s[0] compare: s[2]] == OFOrderedSame && [s[0] compare: @""] != OFOrderedSame && [C(@"") compare: @"a"] == OFOrderedAscending && [C(@"a") compare: @"b"] == OFOrderedAscending && [C(@"cd") compare: @"bc"] == OFOrderedDescending && [C(@"ä") compare: @"ö"] == OFOrderedAscending && [C(@"€") compare: @"ß"] == OFOrderedDescending && [C(@"aa") compare: @"z"] == OFOrderedAscending) #ifdef OF_HAVE_UNICODE_TABLES TEST(@"-[caseInsensitiveCompare:]", [C(@"a") caseInsensitiveCompare: @"A"] == OFOrderedSame && [C(@"Ä") caseInsensitiveCompare: @"ä"] == OFOrderedSame && [C(@"я") caseInsensitiveCompare: @"Я"] == OFOrderedSame && [C(@"€") caseInsensitiveCompare: @"ß"] == OFOrderedDescending && [C(@"ß") caseInsensitiveCompare: @"→"] == OFOrderedAscending && [C(@"AA") caseInsensitiveCompare: @"z"] == OFOrderedAscending && [[stringClass stringWithUTF8String: "ABC"] caseInsensitiveCompare: [stringClass stringWithUTF8String: "AbD"]] == [C(@"abc") compare: @"abd"]) #else TEST(@"-[caseInsensitiveCompare:]", [C(@"a") caseInsensitiveCompare: @"A"] == OFOrderedSame && [C(@"AA") caseInsensitiveCompare: @"z"] == OFOrderedAscending && [[stringClass stringWithUTF8String: "ABC"] caseInsensitiveCompare: [stringClass stringWithUTF8String: "AbD"]] == [C(@"abc") compare: @"abd"]) #endif TEST(@"-[hash] is the same if -[isEqual:] is true", s[0].hash == s[2].hash) |
︙ | ︙ |