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.

23 lines
545 B

  1. #include "../src/arithmeticAddition.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_arithmeticAddition_numberplusnumberequalsnumber(void) {
  11. int expectedResult = 8;
  12. int* result;
  13. result = addition_integer(5, 3);
  14. TEST_ASSERT_EQUAL_INT(expectedResult, *result);
  15. }
  16. void test_arithmeticAddition_numberplusmaxintegervalueequalsnull(void) {
  17. int* result;
  18. result = addition_integer(INT_MAX, 1);
  19. TEST_ASSERT_NULL(result);
  20. }