Browse Source

Test no_collision

remotes/origin/David
David Moeller 11 months ago
parent
commit
5e744b9079
  1. 13
      test/Snake/test_collision.c

13
test/Snake/test_collision.c

@ -21,4 +21,17 @@ void test_self_collision(void){
TEST_ASSERT_TRUE(result);//head collides with body TEST_ASSERT_TRUE(result);//head collides with body
} }
void test_no_collision(void){
/* arrange */
bool result;
Snake snake = initialize_snake();
/* act */
result = check_if_dead(&snake);
/* assert */
TEST_ASSERT_FALSE(result);//head collides with body
}
#endif // TEST #endif // TEST
Loading…
Cancel
Save