From 5e744b90792d9a25be9e8bd17d115710b3d63dce Mon Sep 17 00:00:00 2001 From: David Moeller Date: Thu, 25 Jan 2024 10:01:55 +0100 Subject: [PATCH] Test no_collision --- test/Snake/test_collision.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/Snake/test_collision.c b/test/Snake/test_collision.c index 81d1a76..d0edd61 100644 --- a/test/Snake/test_collision.c +++ b/test/Snake/test_collision.c @@ -21,4 +21,17 @@ void test_self_collision(void){ 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 \ No newline at end of file