85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
[l appendObject: @"Wo\rld!\nHow are you?"];
[l appendObject: [OFURL URLWithString: @"https://webkeks.org/"]];
[l appendObject: [OFXMLElement elementWithXMLString: @"<x><y/></x>"]];
[d setObject: @"list"
forKey: l];
TEST(@"Serialization",
(s = [OFSerialization stringBySerializingObject: d]) &&
[s isEqual: expected])
TEST(@"Deserialization",
[[OFSerialization objectByDeserializingString: s] isEqual: d])
[pool drain];
}
@end
|
<
|
|
|
|
|
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
[l appendObject: @"Wo\rld!\nHow are you?"];
[l appendObject: [OFURL URLWithString: @"https://webkeks.org/"]];
[l appendObject: [OFXMLElement elementWithXMLString: @"<x><y/></x>"]];
[d setObject: @"list"
forKey: l];
TEST(@"-[stringBySerializing]",
(s = [d stringBySerializing]) && [s isEqual: expected])
TEST(@"-[objectByDeserializing]",
[[s objectByDeserializing] isEqual: d])
[pool drain];
}
@end
|