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

@ -55,3 +55,16 @@ void test_ggTOfBoth0(){
//assert //assert
TEST_ASSERT_EQUAL_INT(expected,result); 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
TEST_ASSERT_EQUAL_INT(expected,result);
}
Loading…
Cancel
Save