61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
(nodes[3] = [OFXMLCharacters charactersWithString: @"<foo>"]) &&
[[nodes[3] XMLString] isEqual: @"<foo>"])
TEST(@"+[CDATAWithString:]",
(nodes[3] = [OFXMLCDATA CDATAWithString: @"<foo>"]) &&
[[nodes[3] XMLString] isEqual: @"<![CDATA[<foo>]]>"]);
TEST(@"+[commentWithString:]",
(nodes[3] = [OFXMLComment commentWithString: @" comment "]) &&
[[nodes[3] XMLString] isEqual: @"<!-- comment -->"])
module = @"OFXMLElement";
TEST(@"-[addAttributeWithName:stringValue:]",
R([nodes[0] addAttributeWithName: @"foo" stringValue: @"b&ar"]) &&
[[nodes[0] XMLString] isEqual: @"<foo foo='b&ar'/>"] &&
|
|
|
|
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
(nodes[3] = [OFXMLCharacters charactersWithString: @"<foo>"]) &&
[[nodes[3] XMLString] isEqual: @"<foo>"])
TEST(@"+[CDATAWithString:]",
(nodes[3] = [OFXMLCDATA CDATAWithString: @"<foo>"]) &&
[[nodes[3] XMLString] isEqual: @"<![CDATA[<foo>]]>"]);
TEST(@"+[commentWithText:]",
(nodes[3] = [OFXMLComment commentWithText: @" comment "]) &&
[[nodes[3] XMLString] isEqual: @"<!-- comment -->"])
module = @"OFXMLElement";
TEST(@"-[addAttributeWithName:stringValue:]",
R([nodes[0] addAttributeWithName: @"foo" stringValue: @"b&ar"]) &&
[[nodes[0] XMLString] isEqual: @"<foo foo='b&ar'/>"] &&
|