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.

41 lines
766 B

  1. #include "unity.h"
  2. #include "Spiellogik.h"
  3. #include <stdlib.h>
  4. void setUp(void){
  5. }
  6. void tearDown(void){
  7. }
  8. void test_test1(void){
  9. int result = probe(2);
  10. TEST_ASSERT_EQUAL_INT(2, result);
  11. }
  12. void test_feldFrei_Verhalten_bei_belegtem_Feld(void){
  13. int realU[N][N];
  14. realU[11][12] = 1;
  15. int result = feldFrei( realU, 11,12);
  16. TEST_ASSERT_EQUAL_INT(0 , result);
  17. }
  18. void test_feldFrei_Verhalten_bei_freiem_Feld(void){
  19. int realU[N][N];
  20. realU[11][12] = 0;
  21. int result = feldFrei(realU, 11, 12);
  22. TEST_ASSERT_EQUAL_INT(1, result);
  23. }
  24. //Tests zur Bewegung nach oben
  25. void test_lose_up_freiesFeld(void){
  26. int realU[20][20] = { 0 };
  27. realU[10][12] = 4;
  28. int result = lose(realU, 'u');
  29. TEST_ASSERT_EQUAL_INT(0, result);
  30. }