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.

16 lines
561 B

  1. #include "unity.h"
  2. #include "primzahl.h"
  3. void setUP(){}
  4. void tearDown(){}
  5. void test_primzahl() {
  6. TEST_ASSERT_TRUE(primzahl(2)); // 2 is a prime number
  7. TEST_ASSERT_TRUE(primzahl(3)); // 3 is a prime number
  8. TEST_ASSERT_TRUE(primzahl(5)); // 5 is a prime number
  9. TEST_ASSERT_TRUE(primzahl(7)); // 7 is a prime number
  10. TEST_ASSERT_FALSE(primzahl(1)); // 1 is not a prime number
  11. TEST_ASSERT_FALSE(primzahl(4)); // 4 is not a prime number
  12. TEST_ASSERT_FALSE(primzahl(6)); // 6 is not a prime number
  13. TEST_ASSERT_FALSE(primzahl(9)); // 9 is not a prime number
  14. }