mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
Replace dot notation with method call
This commit is contained in:
parent
153fe3f7f0
commit
992377c6fd
1 changed files with 3 additions and 3 deletions
|
@ -21,19 +21,19 @@ int main(void) {
|
||||||
|
|
||||||
value = [[filtered objectAtIndex:0] objectForKey:@"key"];
|
value = [[filtered objectAtIndex:0] objectForKey:@"key"];
|
||||||
|
|
||||||
PASS(filtered.count == 1 && [value isEqualToString:@"value2"],
|
PASS([filtered count] == 1 && [value isEqualToString:@"value2"],
|
||||||
"NSPredicate should correctly filter array including NSNull");
|
"NSPredicate should correctly filter array including NSNull");
|
||||||
|
|
||||||
// Filtering with NSPredicate where no match is found
|
// Filtering with NSPredicate where no match is found
|
||||||
predicate = [NSPredicate predicateWithFormat:@"key == %@", @"nonexistent"];
|
predicate = [NSPredicate predicateWithFormat:@"key == %@", @"nonexistent"];
|
||||||
filtered = [array filteredArrayUsingPredicate: predicate];
|
filtered = [array filteredArrayUsingPredicate: predicate];
|
||||||
PASS(filtered.count == 0,
|
PASS([filtered count] == 0,
|
||||||
"NSPredicate should return an empty array when no match is found");
|
"NSPredicate should return an empty array when no match is found");
|
||||||
|
|
||||||
// Filtering with NSPredicate with a different key
|
// Filtering with NSPredicate with a different key
|
||||||
predicate = [NSPredicate predicateWithFormat:@"anotherKey == %@", @"value1"];
|
predicate = [NSPredicate predicateWithFormat:@"anotherKey == %@", @"value1"];
|
||||||
filtered = [array filteredArrayUsingPredicate: predicate];
|
filtered = [array filteredArrayUsingPredicate: predicate];
|
||||||
PASS(filtered.count == 0,
|
PASS([filtered count] == 0,
|
||||||
"NSPredicate should return an empty array when filtering with a non-existent key");
|
"NSPredicate should return an empty array when filtering with a non-existent key");
|
||||||
|
|
||||||
[arp release];
|
[arp release];
|
||||||
|
|
Loading…
Reference in a new issue