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.
 
 

40 lines
1.0 KiB

#include "../src/arithmeticDivision.h"
#include "unity.h"
#include "limits.h"
void setUp(void) {
// set stuff up here
}
void tearDown(void) {
// clean stuff up here
}
void test_arithmeticDivision_numberdividedbynumberequalsnumber(void) {
int expectedResult = 2;
int* result;
result = division_integer(14, 7);
TEST_ASSERT_EQUAL_INT(expectedResult, *result);
}
void test_arithmeticDivision_longdividedbylongequalscorrectlong(void) {
long expectedResult = 5;
long* result;
result = division_long(10, 2);
TEST_ASSERT_EQUAL_INT(expectedResult, *result);
}
void test_arithmeticDivsion_floatdividedbyfloatequalscorrectfloat(void) {
float expectedResult = 5.0;
float* result;
result = division_float(10.0, 2.0);
TEST_ASSERT_EQUAL_FLOAT(expectedResult, *result);
}
void test_arithmeticDivision_doubledividedbydoublequalscorrectdouble(void) {
double expectedResult = 5.0;
double* result;
result = division_double(10.0, 2.0);
TEST_ASSERT_EQUAL_DOUBLE(expectedResult, *result);
}