mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39779 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
544a43092e
commit
8a9d9597b0
2 changed files with 18 additions and 3 deletions
|
@ -149,10 +149,12 @@ int main()
|
|||
NSArray *filtered;
|
||||
NSArray *pitches;
|
||||
NSArray *expect;
|
||||
NSArray *a;
|
||||
NSMutableDictionary *dict;
|
||||
NSPredicate *p;
|
||||
NSDictionary *d;
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
|
||||
START_SET("basic")
|
||||
|
||||
dict = [[NSMutableDictionary alloc] init];
|
||||
[dict setObject: @"A Title" forKey: @"title"];
|
||||
|
@ -227,6 +229,19 @@ int main()
|
|||
@"$single LIKE (\"b\\\"\" + \"val_for_$b\") + \"val_for_$c\"",
|
||||
"Predicate created by substitution has the expected format");
|
||||
|
||||
[arp release]; arp = nil;
|
||||
a = [NSArray arrayWithObjects:
|
||||
[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithInt: 1], @"count", nil],
|
||||
[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithInt: 1], @"count", nil],
|
||||
nil];
|
||||
p = [NSPredicate predicateWithFormat: @"sum(@count) == 2"];
|
||||
PASS([p evaluateWithObject: a], "aggregate sum works");
|
||||
|
||||
p = [NSPredicate predicateWithFormat: @"avg(@count) == 1"];
|
||||
PASS([p evaluateWithObject: a], "aggregate avg works");
|
||||
|
||||
END_SET("basic")
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue