You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
407 B

  1. #include "unity.h"
  2. #include <input.h>
  3. #include <stdlib.h>
  4. void setUp(void){
  5. }
  6. void tearDown(void){
  7. }
  8. void test_testArrow(void){
  9. char result = getTInput('\033');
  10. TEST_ASSERT_EQUAL_CHAR('ar', result);
  11. }
  12. void test_testw(void){
  13. char result = getTInput('w');
  14. TEST_ASSERT_EQUAL_CHAR('w', result);
  15. }
  16. void test_testa(void){
  17. char result = getTInput('a');
  18. TEST_ASSERT_EQUAL_CHAR('a', result);
  19. }