diff --git a/LinqToObjectiveCTest/LinqToObjectiveCTestTests/NSArrayLinqExtensionsTest.m b/LinqToObjectiveCTest/LinqToObjectiveCTestTests/NSArrayLinqExtensionsTest.m index 8ff3497..e6d4ec4 100755 --- a/LinqToObjectiveCTest/LinqToObjectiveCTestTests/NSArrayLinqExtensionsTest.m +++ b/LinqToObjectiveCTest/LinqToObjectiveCTestTests/NSArrayLinqExtensionsTest.m @@ -380,8 +380,8 @@ - (void)testGroupByWithNil // test the group keys NSArray* keys = [groupedByFirstLetter allKeys]; - STAssertEqualObjects([NSNull null], keys[0], nil); - STAssertEqualObjects(@"B", keys[1], nil); + STAssertEqualObjects([NSNull null], keys[1], nil); + STAssertEqualObjects(@"B", keys[0], nil); // test that the correct items are in each group NSArray* groupOne = groupedByFirstLetter[[NSNull null]]; @@ -438,8 +438,8 @@ - (void)testToDictionaryWithValueSelectorWithNil // test the group keys NSArray* keys = [dictionary allKeys]; - STAssertEqualObjects([NSNull null], keys[0], nil); - STAssertEqualObjects(@"B", keys[1], nil); + STAssertEqualObjects([NSNull null], keys[1], nil); + STAssertEqualObjects(@"B", keys[0], nil); // test the values STAssertEqualObjects(dictionary[[NSNull null]], @"jim", nil); diff --git a/README.md b/README.md index 25f996a..a5ad233 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,14 @@ NSArray* sortedInput = [input linq_sort]; // 21, 25, 34 NSArray* sortedInput = [input linq_sortDescending]; // 34, 25, 21 ``` +### linq_sum + +```objc +- (NSNumber *)linq_sum; +``` + +Sums the elements in the array. + ### linq_ofType ```objc