Author: rfm
Date: Thu May 19 09:21:36 2016
New Revision: 39779
URL: http://svn.gna.org/viewcvs/gnustep?rev=39779&view=rev
Log:
tweaks
Modified:
libs/base/trunk/Source/NSArray.m
libs/base/trunk/Tests/base/NSPredicate/basic.m
Modified: libs/base/trunk/Source/NSArray.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSArray.m?rev=39779&r1=39778&r2=39779&view=diff
==============================================================================
--- libs/base/trunk/Source/NSArray.m (original)
+++ libs/base/trunk/Source/NSArray.m Thu May 19 09:21:36 2016
@@ -1476,7 +1476,7 @@
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
Modified: libs/base/trunk/Tests/base/NSPredicate/basic.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Tests/base/NSPredicate/basic.m?rev=39779&r1=39778&r2=39779&view=diff
==============================================================================
--- libs/base/trunk/Tests/base/NSPredicate/basic.m (original)
+++ libs/base/trunk/Tests/base/NSPredicate/basic.m Thu May 19 09:21:36 2016
@@ -149,10 +149,12 @@
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 @@
@"$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;
}
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs