39
40
41
42
43
44
45
46
47
48
49
50
51
|
[elem[0] addAttributeWithName: @"foo"
stringValue: @"b&ar"] &&
[[elem[0] string] isEqual: @"<foo foo='b&ar'/>"] &&
[elem[1] addAttributeWithName: @"foo"
stringValue: @"b&ar"] &&
[[elem[1] string] isEqual: @"<foo foo='b&ar'>b&ar</foo>"])
TEST(@"-[addChild",
[elem[0] addChild: [OFXMLElement elementWithName: @"bar"]] &&
[[elem[0] string] isEqual: @"<foo foo='b&ar'><bar/></foo>"])
[pool release];
}
|
|
|
39
40
41
42
43
44
45
46
47
48
49
50
51
|
[elem[0] addAttributeWithName: @"foo"
stringValue: @"b&ar"] &&
[[elem[0] string] isEqual: @"<foo foo='b&ar'/>"] &&
[elem[1] addAttributeWithName: @"foo"
stringValue: @"b&ar"] &&
[[elem[1] string] isEqual: @"<foo foo='b&ar'>b&ar</foo>"])
TEST(@"-[addChild:]",
[elem[0] addChild: [OFXMLElement elementWithName: @"bar"]] &&
[[elem[0] string] isEqual: @"<foo foo='b&ar'><bar/></foo>"])
[pool release];
}
|