Differences From Artifact [6206f4255c]:
- File
tests/OFStringTests.m
— part of check-in
[301ee63212]
at
2011-11-20 18:41:25
on branch trunk
— Make OFString a class cluster.
It is a class cluster now, but there is still much to improve. (user: js, size: 21376) [annotate] [blame] [check-ins using]
To Artifact [7ac7e75e9c]:
- File tests/OFStringTests.m — part of check-in [d8a6ca3fbd] at 2011-11-21 16:47:00 on branch trunk — There is no need to hash 32 bit per character if Unicode has only 24. (user: js, size: 21376) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
113 114 115 116 117 118 119 | TEST(@"-[appendString:] and -[appendUTF8String:]", R([s[1] appendUTF8String: "1๐"]) && R([s[1] appendString: @"3"]) && R([s[0] appendString: s[1]]) && [s[0] isEqual: @"tรคsโฌ1๐3"]) TEST(@"-[length]", [s[0] length] == 7) TEST(@"-[UTF8StringLength]", [s[0] UTF8StringLength] == 13) | | | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | TEST(@"-[appendString:] and -[appendUTF8String:]", R([s[1] appendUTF8String: "1๐"]) && R([s[1] appendString: @"3"]) && R([s[0] appendString: s[1]]) && [s[0] isEqual: @"tรคsโฌ1๐3"]) TEST(@"-[length]", [s[0] length] == 7) TEST(@"-[UTF8StringLength]", [s[0] UTF8StringLength] == 13) TEST(@"-[hash]", [s[0] hash] == 0x2E623BD1) TEST(@"-[characterAtIndex:]", [s[0] characterAtIndex: 0] == 't' && [s[0] characterAtIndex: 1] == 0xE4 && [s[0] characterAtIndex: 3] == 0x20AC && [s[0] characterAtIndex: 5] == 0x1D11E) EXPECT_EXCEPTION(@"Detect out of range in -[characterAtIndex:]", |
︙ | ︙ |