Differences From Artifact [dfc573ade9]:
- File tests/OFXMLNodeTests.m — part of check-in [b045cbb9c7] at 2019-03-25 00:21:30 on branch trunk — tests: Use dot syntax (user: js, size: 5306) [annotate] [blame] [check-ins using]
To Artifact [4fa85e4e25]:
- File
tests/OFXMLNodeTests.m
— part of check-in
[09be825f88]
at
2019-09-29 15:58:33
on branch trunk
— Remove OFAutoreleasePool
OFAutoreleasePools have long been discouraged in favor of the runtime's
autorelease pools. (user: js, size: 5304) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
20 21 22 23 24 25 26 | #import "TestsAppDelegate.h" static OFString *module = @"OFXMLNode"; @implementation TestsAppDelegate (OFXMLNodeTests) - (void)XMLNodeTests { | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #import "TestsAppDelegate.h" static OFString *module = @"OFXMLNode"; @implementation TestsAppDelegate (OFXMLNodeTests) - (void)XMLNodeTests { void *pool = objc_autoreleasePoolPush(); id nodes[4]; OFArray *a; TEST(@"+[elementWithName:]", (nodes[0] = [OFXMLElement elementWithName: @"foo"]) && [[nodes[0] XMLString] isEqual: @"<foo/>"]) |
︙ | ︙ | |||
134 135 136 137 138 139 140 | [OFXMLElement elementWithXMLString: @"<x><y></y></x>"]]) TEST(@"-[XMLStringWithIndentation:]", [[[OFXMLElement elementWithXMLString: @"<x><y><z>a\nb</z>" @"<!-- foo --></y></x>"] XMLStringWithIndentation: 2] isEqual: @"<x>\n <y>\n <z>a\nb</z>\n <!-- foo -->\n </y>\n</x>"]) | | | 134 135 136 137 138 139 140 141 142 143 | [OFXMLElement elementWithXMLString: @"<x><y></y></x>"]]) TEST(@"-[XMLStringWithIndentation:]", [[[OFXMLElement elementWithXMLString: @"<x><y><z>a\nb</z>" @"<!-- foo --></y></x>"] XMLStringWithIndentation: 2] isEqual: @"<x>\n <y>\n <z>a\nb</z>\n <!-- foo -->\n </y>\n</x>"]) objc_autoreleasePoolPop(pool); } @end |