#include "unity.h" #include "Spiellogik.h" #include void setUp(void){ } void tearDown(void){ } void test_test1(void){ int result = probe(2); TEST_ASSERT_EQUAL_INT(2, result); } void test_feldFrei_Verhalten_bei_belegtem_Feld(void){ int realU[N][N]; realU[11][12] = 1; int result = feldFrei( realU, 11,12); TEST_ASSERT_EQUAL_INT(0 , result); } void test_feldFrei_Verhalten_bei_freiem_Feld(void){ int realU[N][N]; realU[11][12] = 0; int result = feldFrei(realU, 11, 12); TEST_ASSERT_EQUAL_INT(1, result); } //Tests zur Bewegung nach oben void test_lose_up_freiesFeld(void){ int realU[20][20] = { 0 }; realU[10][12] = 4; int result = lose(realU, 'u'); TEST_ASSERT_EQUAL_INT(0, result); } void test_lose_up_belegtesFeld(void){ int realU[20][20] = { 0 }; realU[10][12] = 4; realU[9][12] = 3; int result = lose(realU, 'u'); TEST_ASSERT_EQUAL_INT(1, result); } void test_lose_up_Obererrand(void){ int realU[20][20] = { 0 }; realU[0][12] = 4; int result = lose(realU, 'u'); TEST_ASSERT_EQUAL_INT(1, result); }