mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +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
|
@ -1476,7 +1476,7 @@ compare(id elem1, id elem2, void* context)
|
|||
else if ([key isEqualToString: @"count"] == YES)
|
||||
{
|
||||
GSOnceMLog(
|
||||
@"[NSArray-valueForKey:] called wth 'count' is deprecated .. use '@count'");
|
||||
@"[NSArray-valueForKey:] called with 'count' is deprecated .. use '@count'");
|
||||
result = [NSNumber numberWithUnsignedInteger: [self count]];
|
||||
}
|
||||
else
|
||||
|
|
|
@ -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…
Reference in a new issue