CPCompoundPredicate: Fixed typo in -isEqual:. With test.

This commit is contained in:
cacaodev
2011-12-31 16:19:38 +01:00
parent ec9ddc0819
commit ce2316a8ee
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -233,7 +233,7 @@ var CPCompoundPredicateType;
if (self === anObject)
return YES;
if (object.isa !== self.isa || _type !== [anObject compoundPredicateType] || ![_predicates isEqualToArray:[anObject subpredicates]])
if (anObject.isa !== self.isa || _type !== [anObject compoundPredicateType] || ![_predicates isEqualToArray:[anObject subpredicates]])
return NO;
return YES;
+4
View File
@@ -434,6 +434,10 @@
pred1 = [CPPredicate predicateWithFormat:@"$x CONTAINS 'a'"];
pred2 = [CPPredicate predicateWithFormat:@"$x CONTAINS 'a'"];
[self assert:pred1 equals:pred2];
pred1 = [CPPredicate predicateWithFormat:@"a = 'a' AND b = 'b'"];
pred2 = [CPPredicate predicateWithFormat:@"a = 'a' AND b = 'b'"];
[self assert:pred1 equals:pred2];
}
- (void)testProxyArrayFiltering