diff --git a/test/Snake/test_collision.c b/test/Snake/test_collision.c index d0edd61..b70676d 100644 --- a/test/Snake/test_collision.c +++ b/test/Snake/test_collision.c @@ -34,4 +34,17 @@ void test_no_collision(void){ TEST_ASSERT_FALSE(result);//head collides with body } + +void test_wall_collision(void){ + /* arrange */ + bool result; + Snake snake = {{1, 0}, 4, {0 + 16 * 6, 1 + 16 * 6, 2 + 16 * 6, 3 + 16 * 6}}; + + /* act */ + result = check_if_dead(&snake); + + /* assert */ + TEST_ASSERT_TRUE(result);//head collides with body +} + #endif // TEST \ No newline at end of file