@ -0,0 +1,10 @@
#include "arithmeticSubtraction.h"
#include <stdlib.h>
int* subtraction_integer(int a, int b) {
int* result= malloc(sizeof (int));
*result=a - b;
return result;
}
@ -0,0 +1,7 @@
#ifndef THEADMIRALS_ARITHMETICSUBTRACTION_H
#define THEADMIRALS_ARITHMETICSUBTRACTION_H
int* subtraction_integer(int a, int b);
#endif //THEADMIRALS_ARITHMETICSUBTRACTION_H
@ -0,0 +1,18 @@
#include "../src/arithmeticSubtraction.h"
#include "unity.h"
#include "limits.h"
void setUp(void) {
// set stuff up here
void tearDown(void) {
// clean stuff up here
void test_arithmeticSubtraction_subractionoftwonumbers(void) {
int expectedResult = 7;
int* result;
result = subtraction_integer(14, 7);
TEST_ASSERT_EQUAL_INT(expectedResult, *result);