Skip to content
This repository has been archived by the owner on Jun 2, 2018. It is now read-only.

Adding unit tests to BlocksKit #6

Closed
wants to merge 2 commits into from
Closed

Adding unit tests to BlocksKit #6

wants to merge 2 commits into from

Conversation

kaiwu
Copy link
Contributor

@kaiwu kaiwu commented Jul 3, 2011

Hi,

BlocksKit is nice, i started adding unit test for them, the pull request contains tests for

  • NSArray+BlocksKit
  • NSDictionary+BlocksKit

Not sure if i spotted a problem, the method below seems to have a problem
- (id)reduce:(id)initial withBlock:(BKAccumulationBlock)block

its returned object is always invalid
i am bypassing it in the test as

NSString *concatenated = [_subject reduce:@"" withBlock:accumlationBlock];
GHAssertEqualStrings(@"122333",@"122333",@"concatenated string is %@",concatenated);

concatenated is invalid, shall i raise an issue ?

@zwaldowski
Copy link
Collaborator

I'll look into the issue momentarily, and thank you so much for
starting on that, really great stuff. I'll pull them later today,

Sent from my iPad

On Jul 3, 2011, at 10:02 AM, kaiwu
reply@reply.github.com
wrote:

Hi,

BlocksKit is nice, i started adding unit test for them, the pull request contains tests for

  • NSArray+BlocksKit
  • NSDictionary+BlocksKit

Not sure if i spotted a problem, the method below seems to have a problem
- (id)reduce:(id)initial withBlock:(BKAccumulationBlock)block

its returned object is always invalid
i am bypassing it in the test as

NSString *concatenated = [_subject reduce:@"" withBlock:accumlationBlock];
GHAssertEqualStrings(@"122333",@"122333",@"concatenated string is %@",concatenated);

concatenated is invalid, shall i raise an issue ?

Reply to this email directly or view it on GitHub:
#6

@zwaldowski
Copy link
Collaborator

All right, that part's fixed. If you want to modify your commit to make the test actually test again, I'll merge it immediately.

@kaiwu
Copy link
Contributor Author

kaiwu commented Jul 4, 2011

verified the fix with the test, close this pull request with a new one

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants