Differences From Artifact [5f1c00ddf1]:
- File
tests/OFStringTests.m
— part of check-in
[c5ef582958]
at
2013-03-04 17:20:15
on branch trunk
— Replace BOOL with bool.
The only places where BOOL is left are those where they are required by
the ABI. (user: js, size: 23025) [annotate] [blame] [check-ins using]
To Artifact [a5554c7700]:
- File
tests/OFStringTests.m
— part of check-in
[3d16a30f41]
at
2013-06-22 12:12:36
on branch trunk
— Rework exceptions.
This mostly removes the argument for the class in which the exception
occurred. As backtraces were recently added for all platforms, the
passed class does not give any extra information on where the exception
occurred anymore.This also removes a few other arguments which were not too helpful. In
the past, the idea was to pass as many arguments as possible so that it
is easier to find the origin of the exception. However, as backtraces
are a much better way to find the origin, those are not useful anymore
and just make the exception more cumbersome to use. The rule is now to
only pass arguments that might help in recovering from the exception or
provide information that is otherwise not easily accessible. (user: js, size: 23010) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
446 447 448 449 450 451 452 | TEST(@"-[insertString:atIndex:]", (s[0] = [OFMutableString stringWithString: @"πΓΆΓΆΓΆbΓ€β¬"]) && R([s[0] insertString: @"Àâü" atIndex: 3]) && [s[0] isEqual: @"πââÀâüâbΓ€β¬"]) | | | | 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 | TEST(@"-[insertString:atIndex:]", (s[0] = [OFMutableString stringWithString: @"πΓΆΓΆΓΆbΓ€β¬"]) && R([s[0] insertString: @"Àâü" atIndex: 3]) && [s[0] isEqual: @"πââÀâüâbΓ€β¬"]) EXPECT_EXCEPTION(@"Detect invalid format in -[stringByURLDecoding] " @"#1", OFInvalidFormatException, [@"foo%xbar" stringByURLDecoding]) EXPECT_EXCEPTION(@"Detect invalid encoding in -[stringByURLDecoding] " @"#2", OFInvalidEncodingException, [@"foo%FFbar" stringByURLDecoding]) TEST(@"-[setCharacter:atIndex:]", (s[0] = [OFMutableString stringWithString: @"abΓ€de"]) && R([s[0] setCharacter: 0xF6 |
︙ | ︙ | |||
558 559 560 561 562 563 564 | [[s[0] stringByXMLUnescaping] isEqual: @"<hello> &world'\"!&"] && [[@"y" stringByXMLUnescaping] isEqual: @"y"] && [[@"ä" stringByXMLUnescaping] isEqual: @"Γ€"] && [[@"€" stringByXMLUnescaping] isEqual: @"β¬"] && [[@"𝄞" stringByXMLUnescaping] isEqual: @"π"]) EXPECT_EXCEPTION(@"Detect invalid entities in -[stringByXMLUnescaping] " | | | | | | | | 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 | [[s[0] stringByXMLUnescaping] isEqual: @"<hello> &world'\"!&"] && [[@"y" stringByXMLUnescaping] isEqual: @"y"] && [[@"ä" stringByXMLUnescaping] isEqual: @"Γ€"] && [[@"€" stringByXMLUnescaping] isEqual: @"β¬"] && [[@"𝄞" stringByXMLUnescaping] isEqual: @"π"]) EXPECT_EXCEPTION(@"Detect invalid entities in -[stringByXMLUnescaping] " @"#1", OFInvalidFormatException, [@"&foo;" stringByXMLUnescaping]) EXPECT_EXCEPTION(@"Detect invalid entities in -[stringByXMLUnescaping] " @"#2", OFInvalidFormatException, [@"x&" stringByXMLUnescaping]) EXPECT_EXCEPTION(@"Detect invalid entities in -[stringByXMLUnescaping] " @"#3", OFInvalidFormatException, [@"&#;" stringByXMLUnescaping]) EXPECT_EXCEPTION(@"Detect invalid entities in -[stringByXMLUnescaping] " @"#4", OFInvalidFormatException, [@"&#x;" stringByXMLUnescaping]) EXPECT_EXCEPTION(@"Detect invalid entities in -[stringByXMLUnescaping] " @"#5", OFInvalidFormatException, [@"&#g;" stringByXMLUnescaping]) EXPECT_EXCEPTION(@"Detect invalid entities in -[stringByXMLUnescaping] " @"#6", OFInvalidFormatException, [@"&#xg;" stringByXMLUnescaping]) TEST(@"-[stringByXMLUnescapingWithDelegate:]", (h = [[[EntityHandler alloc] init] autorelease]) && [[@"x&foo;y" stringByXMLUnescapingWithDelegate: h] isEqual: @"xbary"]) #ifdef OF_HAVE_BLOCKS |
︙ | ︙ |