mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-28 19:08:50 +00:00
The isSubsetOfSet looking for objects inside itself instead of provided set
This commit is contained in:
1 parent
aa60a7b975
commit
0d5ae63013
2 files changed
+9
-1
No files matched your search
@@ -316,7 +316,7 @@
|
||||
objectEnumerator = [self objectEnumerator];
|
||||
|
||||
while ((object = [objectEnumerator nextObject]) !== nil)
|
||||
if (![self containsObject:object])
|
||||
if (![aSet containsObject:object])
|
||||
return NO;
|
||||
|
||||
return YES;
|
||||
|
||||
@@ -196,6 +196,14 @@
|
||||
[self assertFalse:[set containsObject:nil]];
|
||||
}
|
||||
|
||||
- (void)testIsSubsetOfSet
|
||||
{
|
||||
var set = [CPSet setWithArray:[1, 2, 3, 4, 5]];
|
||||
[self assertTrue:[[CPSet setWithArray:[1, 2, 3]] isSubsetOfSet:set]];
|
||||
[self assertFalse:[[CPSet setWithArray:[1, 2, 3, 100]] isSubsetOfSet:set]];
|
||||
[self assertTrue:[[CPSet new] isSubsetOfSet:set]];
|
||||
}
|
||||
|
||||
- (void)testDescription
|
||||
{
|
||||
var set = [CPSet new];
|
||||
|
||||
Reference in new issue
Block a user