Browse Source

test_test_Mathe_plus

main^2
fdai7731 11 months ago
parent
commit
c862635e21
  1. BIN
      src/main/c/a.exe
  2. 20
      src/test/c/test_Mathe.c
  3. 28
      src/test/c/test_test.c

BIN
src/main/c/a.exe

20
src/test/c/test_Mathe.c

@ -0,0 +1,20 @@
#ifdef TEST
#include "unity.h"
#include "Mathe.h"
void setUp(void)
{
}
void tearDown(void)
{
}
void test_Mathe_plus(void)
{
int a=berechneErgebnis(1,2,'+');
/* assert */
TEST_ASSERT_EQUAL_INT(a,3);
}
#endif

28
src/test/c/test_test.c

@ -1,28 +0,0 @@
#ifdef TEST
#include "unity.h"
#include "test.h"
void setUp(void)
{
}
void tearDown(void)
{
}
void test_test__return_5(void)
{
/* arrange */
int expected = 5;
int actual;
/* act */
actual = return_5();
/* assert */
TEST_ASSERT_EQUAL_INT(expected, actual);
}
#endif // TEST
Loading…
Cancel
Save