mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Fix execute_xpath() to return an NSError when expression can't be evaluated; Remove previous attributes when setting attributes; Add related tests
This commit is contained in:
parent
3f994d3ee1
commit
50f447f5b8
5 changed files with 81 additions and 3 deletions
|
@ -43,7 +43,15 @@ int main()
|
|||
NSInternalInconsistencyException,
|
||||
"cannot add attributes to multiple parents");
|
||||
|
||||
|
||||
[root1 setAttributes:@[attr2]];
|
||||
PASS_EQUAL([root1 attributeForName: @"attr2"], attr2,
|
||||
"setAttributes: added the new attribute");
|
||||
PASS_EQUAL([root1 attributeForName: @"attr1"], nil,
|
||||
"setAttributes: removed the old attribute");
|
||||
PASS_EQUAL([root1 attributes], @[attr2], "attributes are just as set");
|
||||
[root1 setAttributes:@[]];
|
||||
PASS_EQUAL([root1 attributes], @[], "setAttributes:@[] removes all attributes");
|
||||
|
||||
|
||||
[root1 release];
|
||||
[root2 release];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue