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.
46 lines
632 B
46 lines
632 B
#ifdef TEST
|
|
#include "unity.h"
|
|
#include "kleiner_groessergleich.h"
|
|
#include "kleiner_groessergleich.c"
|
|
|
|
void setUp(void)
|
|
{
|
|
|
|
}
|
|
|
|
void tearDown(void)
|
|
{
|
|
|
|
}
|
|
|
|
// Test 1
|
|
void test_gleich(void)
|
|
{
|
|
int result, expected = 3;
|
|
|
|
result = vergleicheZahlen_int(1,1);
|
|
|
|
TEST_ASSERT_EQUAL_INT(expected, result);
|
|
}
|
|
|
|
//Test 2
|
|
void test_kleiner(void)
|
|
{
|
|
int result, expected = 1;
|
|
|
|
result = vergleicheZahlen_int(1,2);
|
|
|
|
TEST_ASSERT_EQUAL_INT(expected, result);
|
|
}
|
|
|
|
//Test 3
|
|
void test_groesser(void)
|
|
{
|
|
int result, expected = 2;
|
|
|
|
result = vergleicheZahlen_int(2,1);
|
|
|
|
TEST_ASSERT_EQUAL_INT(expected, result);
|
|
}
|
|
|
|
#endif //TEST
|