|
@ -52,6 +52,19 @@ void test_ggTOfBoth0(){ |
|
|
//act |
|
|
//act |
|
|
int result = ggT(a,b); |
|
|
int result = ggT(a,b); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expected,result); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_ggTOfCoprimes(){ |
|
|
|
|
|
//arrange |
|
|
|
|
|
int a = 13; |
|
|
|
|
|
int b = 27; |
|
|
|
|
|
int expected = 1; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
int result = ggT(a,b); |
|
|
|
|
|
|
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_EQUAL_INT(expected,result); |
|
|
TEST_ASSERT_EQUAL_INT(expected,result); |
|
|
} |
|
|
} |