From be79c1507e598c3ad8052eb46a7bd426307904e5 Mon Sep 17 00:00:00 2001 From: fdai7184 Date: Fri, 10 Feb 2023 23:31:12 +0100 Subject: [PATCH] testing kbhit --- src/input.h | 1 + test/test_input.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/input.h b/src/input.h index b20039c..33c4cfc 100644 --- a/src/input.h +++ b/src/input.h @@ -4,5 +4,6 @@ char getInput(); char getTInput(char key); +int kbhit(void); #endif diff --git a/test/test_input.c b/test/test_input.c index 96a67d3..3e1c960 100644 --- a/test/test_input.c +++ b/test/test_input.c @@ -72,3 +72,8 @@ void test_testb(void){ char result = getTInput('b'); TEST_ASSERT_EQUAL_CHAR('n', result); } + +void test_testkbhit(void){ + int result = kbhit(); + TEST_ASSERT_EQUAL_INT(0, result); +}