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.
 
 
 

25 lines
449 B

#include "unity.h"
#include "ggT.h"
void setUp(){}
void tearDown(){}
void test_ggTOf5And10(){
TEST_ASSERT_EQUAL_INT(5, ggT(5, 10));
}
void test_ggTOfFirstNumberZero(){
TEST_ASSERT_EQUAL_INT(5, ggT(0, 5));
}
void test_ggTOfSecondNumberZero(){
TEST_ASSERT_EQUAL_INT(10, ggT(10, 0));
}
void test_ggTOfBothNumbersZero(){
TEST_ASSERT_EQUAL_INT(0, ggT(0, 0));
}
void test_ggTOfCoprimes(){
TEST_ASSERT_EQUAL_INT(1, ggT(13, 27));
}