62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
TEST(@"-[appendString:] and -[appendCString:]",
[s[1] appendCString: "1𝄞"] && [s[1] appendString: @"3"] &&
[[s[0] appendString: s[1]] isEqual: @"täs€1𝄞3"])
TEST(@"-[length]", [s[0] length] == 7)
TEST(@"-[cStringLength]", [s[0] cStringLength] == 13)
TEST(@"-[hash]", [s[0] hash] == 0x8AC1EEF6)
TEST(@"-[reverse]", [[s[0] reverse] isEqual: @"3𝄞1€sät"])
s[0] = [OFMutableString stringWithString: @"321tset"];
TEST(@"-[upper]", [[s[0] upper] isEqual: @"321TSET"])
TEST(@"-[lower]", [[s[0] lower] isEqual: @"321tset"])
TEST(@"+[stringWithCString:length:]",
|
>
>
>
>
>
>
>
>
>
|
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
TEST(@"-[appendString:] and -[appendCString:]",
[s[1] appendCString: "1𝄞"] && [s[1] appendString: @"3"] &&
[[s[0] appendString: s[1]] isEqual: @"täs€1𝄞3"])
TEST(@"-[length]", [s[0] length] == 7)
TEST(@"-[cStringLength]", [s[0] cStringLength] == 13)
TEST(@"-[hash]", [s[0] hash] == 0x8AC1EEF6)
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:]",
OFOutOfRangeException, [s[0] characterAtIndex: 7])
TEST(@"-[reverse]", [[s[0] reverse] isEqual: @"3𝄞1€sät"])
s[0] = [OFMutableString stringWithString: @"321tset"];
TEST(@"-[upper]", [[s[0] upper] isEqual: @"321TSET"])
TEST(@"-[lower]", [[s[0] lower] isEqual: @"321tset"])
TEST(@"+[stringWithCString:length:]",
|