Fix test for sum() aggregate: It was calling the count operator on

the array instead of actually summing up the values.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39851 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Niels Grewe 2016-06-08 07:45:56 +00:00
parent 209146a7a4
commit cb6b795926

View file

@ -231,11 +231,11 @@ int main()
a = [NSArray arrayWithObjects:
[NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt: 1], @"count", nil],
[NSNumber numberWithInt: 1], @"a", nil],
[NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt: 1], @"count", nil],
[NSNumber numberWithInt: 2], @"a", nil],
nil];
p = [NSPredicate predicateWithFormat: @"sum(count) == 2"];
p = [NSPredicate predicateWithFormat: @"sum(a) == 3"];
PASS([p evaluateWithObject: a], "aggregate sum works");
END_SET("basic")