@ -0,0 +1,17 @@
#include "arithmeticMultiplication_Int.h"
#include <stdlib.h>
int* multiplication_integer(int num1, int num2) {
int *result = (int*)malloc(sizeof(int));
if (result == NULL) {
// Handle memory allocation failure
return NULL;
}
*result = num1 * num2;
return result;
@ -0,0 +1,8 @@
#ifndef THEADMIRALS_ARITHMETICMULTIPLICATION_INT_H
#define THEADMIRALS_ARITHMETICMULTIPLICATION_INT_H
int* multiplication_integer(int, int);
#endif //THEADMIRALS_ARITHMETICMULTIPLICATION_INT_H
@ -0,0 +1,21 @@
#include "../src/arithmeticMultiplication_Int.h"
#include "unity.h"
#include "limits.h"
void setUp(void) {
// set stuff up here
void tearDown(void) {
// clean stuff up here
void test_arithmeticMultiplication_numbertimesnumberequalsnumber(void) {
int expectedResult = 10;
int* result;
result = multiplication_integer(2,5);
TEST_ASSERT_EQUAL_INT(expectedResult, *result);