From cb05d931674d4f575cd3ba953584ad7d82ce477b Mon Sep 17 00:00:00 2001 From: hmelder Date: Sun, 10 Dec 2023 18:27:03 +0100 Subject: [PATCH] Remove array and dictionary literals --- Tests/base/NSPredicate/nsnull.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tests/base/NSPredicate/nsnull.m b/Tests/base/NSPredicate/nsnull.m index d443fed88..0ca39dae4 100644 --- a/Tests/base/NSPredicate/nsnull.m +++ b/Tests/base/NSPredicate/nsnull.m @@ -6,11 +6,15 @@ int main(void) { NSAutoreleasePool *arp = [NSAutoreleasePool new]; + NSDictionary *dict1, *dict2; NSArray *array, *filtered; NSPredicate *predicate; + dict1 = [NSDictionary dictionaryWithObject:@"value1" forKey:@"key"]; + dict2 = [NSDictionary dictionaryWithObject:@"value2" forKey:@"key"]; + array = [NSArray arrayWithObjects:dict1, dict2, [NSNull null], nil]; + // Basic filtering with NSPredicate - array = @[@{@"key": @"value1"}, @{@"key": @"value2"}, [NSNull null]]; predicate = [NSPredicate predicateWithFormat:@"key == %@", @"value2"]; filtered = [array filteredArrayUsingPredicate: predicate];