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 153fe3f commit 992377c
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 992377c

Please sign in to comment.