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.

24 lines
449 B

  1. #include "unity.h"
  2. #include "ggT.h"
  3. void setUp(){}
  4. void tearDown(){}
  5. void test_ggTOf5And10(){
  6. TEST_ASSERT_EQUAL_INT(5, ggT(5, 10));
  7. }
  8. void test_ggTOfFirstNumberZero(){
  9. TEST_ASSERT_EQUAL_INT(5, ggT(0, 5));
  10. }
  11. void test_ggTOfSecondNumberZero(){
  12. TEST_ASSERT_EQUAL_INT(10, ggT(10, 0));
  13. }
  14. void test_ggTOfBothNumbersZero(){
  15. TEST_ASSERT_EQUAL_INT(0, ggT(0, 0));
  16. }
  17. void test_ggTOfCoprimes(){
  18. TEST_ASSERT_EQUAL_INT(1, ggT(13, 27));
  19. }