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.

25 lines
539 B

  1. #include "../src/inputHandler.h"
  2. #include "unity.h"
  3. void setUp(void) {
  4. // set stuff up here
  5. }
  6. void tearDown(void) {
  7. // clean stuff up here
  8. }
  9. void test_inputHandler_returntwoforinputminus(void) {
  10. int expectedResult = 2;
  11. int result;
  12. result = getOperationIdBySymbol('-');
  13. TEST_ASSERT_EQUAL_INT(expectedResult, result);
  14. }
  15. void test_inputHandler_returnoneforinputplus(void) {
  16. int expectedResult = 1;
  17. int result;
  18. result = getOperationIdBySymbol('+');
  19. TEST_ASSERT_EQUAL_INT(expectedResult, result);
  20. }