Skip to content

Instantly share code, notes, and snippets.

@quakeboy
Created January 20, 2016 05:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quakeboy/41afb68ff50bcf1f763e to your computer and use it in GitHub Desktop.
Save quakeboy/41afb68ff50bcf1f763e to your computer and use it in GitHub Desktop.
//code
int amazingAddMethod(int a, int b)
{
return a+b;
}
//test
void testForAmazingAddMethod(int a, int b)
{
for (int a = 0; a < 10; a++)
for (int b = 0; b < 10; b++)
Assert( amazingAddMethod(a, b) == (a + b) );
Assert (amazingAddMethod(4, 5) == 9);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment