54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
@" <key>foo</key>"
@" <string>bar</string>"
@"</dict>");
@implementation TestsAppDelegate (OFPLISTParser)
- (void)propertyListTests
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
OFArray *array = [OFArray arrayWithObjects:
@"Hello",
[OFData dataWithItems: "World!"
count: 6],
[OFDate dateWithTimeIntervalSince1970: 1521030896],
[OFNumber numberWithBool: true],
[OFNumber numberWithBool: false],
|
|
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
@" <key>foo</key>"
@" <string>bar</string>"
@"</dict>");
@implementation TestsAppDelegate (OFPLISTParser)
- (void)propertyListTests
{
void *pool = objc_autoreleasePoolPush();
OFArray *array = [OFArray arrayWithObjects:
@"Hello",
[OFData dataWithItems: "World!"
count: 6],
[OFDate dateWithTimeIntervalSince1970: 1521030896],
[OFNumber numberWithBool: true],
[OFNumber numberWithBool: false],
|
110
111
112
113
114
115
116
117
118
119
|
[PLIST(@"<dict><key/><string/><key/></dict>") propertyListValue])
EXPECT_EXCEPTION(
@"-[propertyListValue] detecting invalid format #5",
OFInvalidFormatException,
[PLIST(@"<dict><key x='x'/><string/></dict>") propertyListValue])
[pool drain];
}
@end
|
|
|
110
111
112
113
114
115
116
117
118
119
|
[PLIST(@"<dict><key/><string/><key/></dict>") propertyListValue])
EXPECT_EXCEPTION(
@"-[propertyListValue] detecting invalid format #5",
OFInvalidFormatException,
[PLIST(@"<dict><key x='x'/><string/></dict>") propertyListValue])
objc_autoreleasePoolPop(pool);
}
@end
|