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.

38 lines
730 B

  1. #include "unity.h"
  2. #include "kgV.h"
  3. #include "ggT.h"
  4. void setUp(void){}
  5. void tearDown(void){}
  6. void test_kgV8And6(void) {
  7. TEST_ASSERT_EQUAL_INT(24, kgV(8, 6));
  8. }
  9. void test_kgVOfFirstNumberZero(){
  10. TEST_ASSERT_EQUAL_INT(0, kgV(0, 5));
  11. }
  12. void test_kgVOfSecondNumberZero(){
  13. TEST_ASSERT_EQUAL_INT(0, kgV(5, 0));
  14. }
  15. void test_kgVOfBothNumbersZero(){
  16. TEST_ASSERT_EQUAL_INT(0, kgV(0, 0));
  17. }
  18. void test_kgVOf2And17(){
  19. TEST_ASSERT_EQUAL_INT(34, kgV(2, 17));
  20. }
  21. void test_kgVOfFirstNumberNegative(){
  22. TEST_ASSERT_EQUAL_INT(34, kgV(-2, 17));
  23. }
  24. void test_kgVOfSecondNumberNegative(){
  25. TEST_ASSERT_EQUAL_INT(34, kgV(2, -17));
  26. }
  27. void test_kgVOfBothNumbersNegative(){
  28. TEST_ASSERT_EQUAL_INT(34, kgV(-2, -17));
  29. }