|
|
@ -0,0 +1,24 @@ |
|
|
|
#include "../src/arithmeticAddition.h" |
|
|
|
#include "unity.h" |
|
|
|
#include "limits.h" |
|
|
|
|
|
|
|
void setUp(void) { |
|
|
|
// set stuff up here |
|
|
|
} |
|
|
|
|
|
|
|
void tearDown(void) { |
|
|
|
// clean stuff up here |
|
|
|
} |
|
|
|
|
|
|
|
void test_arithmeticAddition_numberplusnumberequalsnumber(void) { |
|
|
|
int expectedResult = 8; |
|
|
|
int* result; |
|
|
|
result = addition_integer(5, 3); |
|
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, *result); |
|
|
|
} |
|
|
|
|
|
|
|
void test_arithmeticAddition_numberplusmaxintegervalueequalsnull(void) { |
|
|
|
int* result; |
|
|
|
result = addition_integer(INT_MAX, 1); |
|
|
|
TEST_ASSERT_NULL(result); |
|
|
|
} |