|
|
@ -0,0 +1,17 @@ |
|
|
|
#include "unity.h" |
|
|
|
#include "primzahl.h" |
|
|
|
|
|
|
|
void setUP(){} |
|
|
|
void tearDown(){} |
|
|
|
|
|
|
|
void test_primzahl() { |
|
|
|
TEST_ASSERT_TRUE(primzahl(2)); // 2 is a prime number |
|
|
|
TEST_ASSERT_TRUE(primzahl(3)); // 3 is a prime number |
|
|
|
TEST_ASSERT_TRUE(primzahl(5)); // 5 is a prime number |
|
|
|
TEST_ASSERT_TRUE(primzahl(7)); // 7 is a prime number |
|
|
|
TEST_ASSERT_FALSE(primzahl(1)); // 1 is not a prime number |
|
|
|
TEST_ASSERT_FALSE(primzahl(4)); // 4 is not a prime number |
|
|
|
TEST_ASSERT_FALSE(primzahl(6)); // 6 is not a prime number |
|
|
|
TEST_ASSERT_FALSE(primzahl(9)); // 9 is not a prime number |
|
|
|
|
|
|
|
} |