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.

43 lines
663 B

  1. #include "unity.h"
  2. #include "ggT.h"
  3. void setUp(){}
  4. void tearDown(){}
  5. void test_ggTOf5And10(){
  6. //arrange
  7. int a = 5;
  8. int b = 10;
  9. int expected = 5;
  10. //act
  11. int result = ggT(a,b);
  12. //assert
  13. TEST_ASSERT_EQUAL_INT(expected, result);
  14. }
  15. void test_ggTOf0AndPositiveNumber(){
  16. //arrange
  17. int a = 0;
  18. int b = 5;
  19. int expected = 5;
  20. //act
  21. int result = ggT(a,b);
  22. //assert
  23. TEST_ASSERT_EQUAL_INT(expected, result);
  24. }
  25. void test_ggTOfPositiveAnd0(){
  26. //arrange
  27. int a = 10;
  28. int b = 0;
  29. int expected = 10;
  30. //act
  31. int result = ggT(a,b);
  32. //assert
  33. TEST_ASSERT_EQUAL_INT(expected, result);
  34. }