Browse Source

added test for coprime numbers

remotes/origin/ggT
cxnnqr 11 months ago
parent
commit
e7da9ff108
  1. 13
      test/ggT/test_ggT.c

13
test/ggT/test_ggT.c

@ -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);
} }
Loading…
Cancel
Save