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.

31 lines
823 B

  1. #include "../src/arithmeticSubtraction.h"
  2. #include "unity.h"
  3. #include "limits.h"
  4. void setUp(void) {
  5. // set stuff up here
  6. }
  7. void tearDown(void) {
  8. // clean stuff up here
  9. }
  10. void test_arithmeticSubtraction_subractionoftwonumbers(void) {
  11. int expectedResult = 7;
  12. int* result;
  13. result = subtraction_integer(14, 7);
  14. TEST_ASSERT_EQUAL_INT(expectedResult, *result);
  15. }
  16. void test_arithmeticSubtraction_subractionoftwonumberswithfloat(void) {
  17. float expectedResult = 7;
  18. float* result;
  19. result = subtraction_float(14, 7);
  20. TEST_ASSERT_EQUAL_FLOAT(expectedResult, *result);
  21. }
  22. void test_arithmeticSubtraction_subractionoftwonumberswithdouble(void) {
  23. double expectedResult = 7;
  24. double* result;
  25. result = subtraction_double(14, 7);
  26. TEST_ASSERT_EQUAL_DOUBLE (expectedResult, *result);
  27. }