|
@ -11,6 +11,7 @@ void tearDown(void){ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//test arrowkeyinput |
|
|
void test_testArrow(void){ |
|
|
void test_testArrow(void){ |
|
|
|
|
|
|
|
|
char result = getTInput('\033'); |
|
|
char result = getTInput('\033'); |
|
@ -18,43 +19,50 @@ void test_testArrow(void){ |
|
|
TEST_ASSERT_EQUAL_CHAR('ar', result); |
|
|
TEST_ASSERT_EQUAL_CHAR('ar', result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//test input 'w' |
|
|
void test_testw(void){ |
|
|
void test_testw(void){ |
|
|
char result = getTInput('w'); |
|
|
char result = getTInput('w'); |
|
|
TEST_ASSERT_EQUAL_CHAR('w', result); |
|
|
TEST_ASSERT_EQUAL_CHAR('w', result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//test input 'a' |
|
|
void test_testa(void){ |
|
|
void test_testa(void){ |
|
|
char result = getTInput('a'); |
|
|
char result = getTInput('a'); |
|
|
TEST_ASSERT_EQUAL_CHAR('a', result); |
|
|
TEST_ASSERT_EQUAL_CHAR('a', result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//test input 's' |
|
|
void test_tests(void){ |
|
|
void test_tests(void){ |
|
|
char result = getTInput('s'); |
|
|
char result = getTInput('s'); |
|
|
TEST_ASSERT_EQUAL_CHAR('s', result); |
|
|
TEST_ASSERT_EQUAL_CHAR('s', result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//test input 'd' |
|
|
void test_testd(void){ |
|
|
void test_testd(void){ |
|
|
char result = getTInput('d'); |
|
|
char result = getTInput('d'); |
|
|
TEST_ASSERT_EQUAL_CHAR('d', result); |
|
|
TEST_ASSERT_EQUAL_CHAR('d', result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//test input 'q' |
|
|
void test_testq(void){ |
|
|
void test_testq(void){ |
|
|
char result = getTInput('q'); |
|
|
char result = getTInput('q'); |
|
|
TEST_ASSERT_EQUAL_CHAR('q', result); |
|
|
TEST_ASSERT_EQUAL_CHAR('q', result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//test input 'p' |
|
|
void test_testp(void){ |
|
|
void test_testp(void){ |
|
|
char result = getTInput('p'); |
|
|
char result = getTInput('p'); |
|
|
TEST_ASSERT_EQUAL_CHAR('p', result); |
|
|
TEST_ASSERT_EQUAL_CHAR('p', result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//test input invalid |
|
|
void test_testn(void){ |
|
|
void test_testn(void){ |
|
|
char result = getTInput('n'); |
|
|
char result = getTInput('n'); |
|
|
TEST_ASSERT_EQUAL_CHAR('n', result); |
|
|
TEST_ASSERT_EQUAL_CHAR('n', result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//test input invalid |
|
|
void test_testg(void){ |
|
|
void test_testg(void){ |
|
|
char result = getTInput('g'); |
|
|
char result = getTInput('g'); |
|
|
TEST_ASSERT_EQUAL_CHAR('n', result); |
|
|
TEST_ASSERT_EQUAL_CHAR('n', result); |
|
|
} |
|
|
} |
|
|
|
|
|
|