|
@ -4,6 +4,7 @@ |
|
|
|
|
|
|
|
|
#include "exponent.h" |
|
|
#include "exponent.h" |
|
|
#include "logarithmus.h" |
|
|
#include "logarithmus.h" |
|
|
|
|
|
#include "reihen.h" |
|
|
|
|
|
|
|
|
void setUp(void) |
|
|
void setUp(void) |
|
|
{ |
|
|
{ |
|
@ -101,26 +102,4 @@ void test_exponent_edge_case(void){ |
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, -1.0, r5); |
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, -1.0, r5); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void test_Exponent_with_positive_number(void){ |
|
|
|
|
|
double r1, r2, r3; |
|
|
|
|
|
|
|
|
|
|
|
r1 = exponential(0.0); |
|
|
|
|
|
r2 = exponential(1.0); |
|
|
|
|
|
r3 = exponential(2.0); |
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_DOUBLE(1.0, r1); |
|
|
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, 2.718282, r2); |
|
|
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, 7.389056, r3); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_Exponent_with_negative_number(void){ |
|
|
|
|
|
double r1, r2, r3; |
|
|
|
|
|
|
|
|
|
|
|
r1 = exponential(-1.0); |
|
|
|
|
|
r2 = exponential(-2.0); |
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.000001, 0.367879, r1); |
|
|
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.000001, 0.135335, r2); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endif // TEST |
|
|
#endif // TEST |