Skip to content

Commit

Permalink
Replace dot notation with method call
Browse files Browse the repository at this point in the history
  • Loading branch information
hmelder committed Dec 28, 2023
1 parent b9b97dc commit d18f8a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/base/NSPredicate/nsnull.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ int main(void) {

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");

// Filtering with NSPredicate where no match is found
predicate = [NSPredicate predicateWithFormat:@"key == %@", @"nonexistent"];
filtered = [array filteredArrayUsingPredicate: predicate];
PASS(filtered.count == 0,
PASS([filtered count] == 0,
"NSPredicate should return an empty array when no match is found");

// Filtering with NSPredicate with a different key
predicate = [NSPredicate predicateWithFormat:@"anotherKey == %@", @"value1"];
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");

[arp release];
Expand Down

0 comments on commit d18f8a8

Please sign in to comment.