mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
fix non-portable testcases
This commit is contained in:
parent
b677ea402a
commit
d32065b322
1 changed files with 6 additions and 5 deletions
|
@ -43,15 +43,16 @@ int main()
|
|||
NSInternalInconsistencyException,
|
||||
"cannot add attributes to multiple parents");
|
||||
|
||||
[root1 setAttributes:@[attr2]];
|
||||
[root1 setAttributes: [NSArray arrayWithObject: 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");
|
||||
|
||||
PASS_EQUAL([root1 attributes], [NSArray arrayWithObject: attr2],
|
||||
"attributes are just as set");
|
||||
[root1 setAttributes: [NSArray array]];
|
||||
PASS_EQUAL([root1 attributes], [NSArray array],
|
||||
"setAttributes: to an empty array removes all attributes");
|
||||
|
||||
[root1 release];
|
||||
[root2 release];
|
||||
|
|
Loading…
Reference in a new issue