|
|
@ -453,7 +453,7 @@ void test_generateRandomNumber_withinValidRange(void) |
|
|
|
/* arrange */ |
|
|
|
|
|
|
|
/* act */ |
|
|
|
int result = generateRandomNumber(1, 100); |
|
|
|
int result = zufallszahl(1, 100); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_TRUE(result >= 1 && result <= 100); |
|
|
@ -466,7 +466,7 @@ void test_addition(void) |
|
|
|
int b = 10; |
|
|
|
|
|
|
|
/* act */ |
|
|
|
int result = addition(a, b); |
|
|
|
int result = add(a, b); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_EQUAL_INT(15, result); |
|
|
@ -479,7 +479,7 @@ void test_subtraction(void) |
|
|
|
int b = 10; |
|
|
|
|
|
|
|
/* act */ |
|
|
|
int result = subtraction(a, b); |
|
|
|
int result = minus(a, b); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_EQUAL_INT(5, result); |
|
|
@ -493,7 +493,7 @@ void test_multiplication(void) |
|
|
|
int b = 10; |
|
|
|
|
|
|
|
/* act */ |
|
|
|
int result = multiplication(a, b); |
|
|
|
int result = mal(a, b); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_EQUAL_INT(50, result); |
|
|
@ -506,7 +506,7 @@ void test_division(void) |
|
|
|
int b = 3; |
|
|
|
|
|
|
|
/* act */ |
|
|
|
int result = division(a, b); |
|
|
|
int result = durch(a, b); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_EQUAL_INT(5, result); |
|
|
@ -519,7 +519,7 @@ void test_division_byZero_returnsZero(void) |
|
|
|
int num2 = 0; |
|
|
|
|
|
|
|
/* act */ |
|
|
|
int result = division(num1, num2); |
|
|
|
int result = durch(num1, num2); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_EQUAL_INT(0, result); |
|
|
@ -584,7 +584,7 @@ void test_exponentiation(void) |
|
|
|
int exponent = 3; |
|
|
|
|
|
|
|
/* act */ |
|
|
|
int result = exponentiation(base, exponent); |
|
|
|
int result = exponent(base, expo); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_EQUAL_INT(8, result); |
|
|
@ -597,7 +597,7 @@ void test_exponentiation_negativeExponent(void) |
|
|
|
int exponent = -3; |
|
|
|
|
|
|
|
/* act */ |
|
|
|
int result = exponentiation(base, exponent); |
|
|
|
int result = exponent(base, expo); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_EQUAL_INT(0, result); |
|
|
|