Fix NSPredicate test using GCC

This commit is contained in:
Frederik Seiffert 2022-09-11 15:48:04 +02:00 committed by Frederik Seiffert
parent 8f8585405e
commit 179158dbc5

View file

@ -250,8 +250,10 @@ int main()
p = [NSPredicate predicateWithFormat: @"sum(a) == 3"];
PASS([p evaluateWithObject: a], "aggregate sum works");
p = [NSPredicate predicateWithFormat: @"self IN %@", @[@"yes"]];
a = [@[@"yes", @"no"] filteredArrayUsingPredicate: p];
p = [NSPredicate predicateWithFormat: @"self IN %@",
[NSArray arrayWithObject:@"yes"]];
a = [[NSArray arrayWithObjects:@"yes", @"no", nil]
filteredArrayUsingPredicate: p];
PASS_EQUAL([a description], @"(yes)",
"predicate created with format can filter an array")