Skip to content

Instantly share code, notes, and snippets.

@yaakaito
Created May 15, 2012 18:06
Show Gist options
  • Save yaakaito/2703804 to your computer and use it in GitHub Desktop.
Save yaakaito/2703804 to your computer and use it in GitHub Desktop.
quickcheckこんな感じかのぉ
- (BOOL)propAdd:(NSInteger)a b:(NSInteger)b {
return [Hoge add:a b:b] == a + b;
}
- (void)testAdd {
NLTQuickCheckTests *testCase = [NLTQuickCheckTest testWithName:@"exsample"
propSelector:@selector(propAdd:b:)
arbitrarys:[NSArray arrayWithObjects:[NLTQuickCheckArbitrary intArbitray],
[NLTQuickCheckArbitrary intArbitray], nil]];
STAssertTrue([testCase success], @"%@", [testCase report]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment