You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

45 lines
841 B

#include "unity.h"
#include "kgV.h"
#include "ggT.h"
void setUp(void){}
void tearDown(void){}
// Tests for common Cases:
void test_kgV8And6(void) {
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(){
TEST_ASSERT_EQUAL_INT(0, kgV(0, 5));
}
void test_kgVOfSecondNumberZero(){
TEST_ASSERT_EQUAL_INT(0, kgV(5, 0));
}
void test_kgVOfBothNumbersZero(){
TEST_ASSERT_EQUAL_INT(0, kgV(0, 0));
}
// Tests for Cases with negative numbers
void test_kgVOfFirstNumberNegative(){
TEST_ASSERT_EQUAL_INT(34, kgV(-2, 17));
}
void test_kgVOfSecondNumberNegative(){
TEST_ASSERT_EQUAL_INT(34, kgV(2, -17));
}
void test_kgVOfBothNumbersNegative(){
TEST_ASSERT_EQUAL_INT(34, kgV(-2, -17));
}