Browse Source

refactoring: added comments

remotes/origin/kgV
cxnnqr 11 months ago
parent
commit
bd68e40324
  1. 13
      test/kgV/test_kgV.c

13
test/kgV/test_kgV.c

@ -5,10 +5,18 @@
void setUp(void){} void setUp(void){}
void tearDown(void){} void tearDown(void){}
// Tests for common Cases:
void test_kgV8And6(void) { void test_kgV8And6(void) {
TEST_ASSERT_EQUAL_INT(24, kgV(8, 6)); TEST_ASSERT_EQUAL_INT(24, kgV(8, 6));
} }
void test_kgVOf2And17(){
TEST_ASSERT_EQUAL_INT(34, kgV(2, 17));
}
// Tests for Cases with Zero in input:
void test_kgVOfFirstNumberZero(){ void test_kgVOfFirstNumberZero(){
TEST_ASSERT_EQUAL_INT(0, kgV(0, 5)); TEST_ASSERT_EQUAL_INT(0, kgV(0, 5));
} }
@ -21,10 +29,9 @@ void test_kgVOfBothNumbersZero(){
TEST_ASSERT_EQUAL_INT(0, kgV(0, 0)); TEST_ASSERT_EQUAL_INT(0, kgV(0, 0));
} }
void test_kgVOf2And17(){
TEST_ASSERT_EQUAL_INT(34, kgV(2, 17));
}
// Tests for Cases with negative numbers
void test_kgVOfFirstNumberNegative(){ void test_kgVOfFirstNumberNegative(){
TEST_ASSERT_EQUAL_INT(34, kgV(-2, 17)); TEST_ASSERT_EQUAL_INT(34, kgV(-2, 17));
} }

Loading…
Cancel
Save