Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kthohr committed Jan 21, 2022
1 parent 1a5106f commit 6251231
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 5 deletions.
10 changes: 7 additions & 3 deletions tests/erf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
##
################################################################################*/

#define TEST_ERR_TOL 1e-12

#define TEST_PRINT_PRECISION_1 3
#define TEST_PRINT_PRECISION_2 18
#define TEST_PRINT_PRECISION_2 10

#include "gcem_tests.hpp"

Expand All @@ -32,11 +34,13 @@ int main()
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, -3.0L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, -2.5L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, -2.11L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, -2.05L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, -2.099L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, -2.0L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, -1.3L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, 0.0L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, 1.3L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, 2.05L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, 2.0L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, 2.099L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, 2.11L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, 2.5L);
GCEM_TEST_COMPARE_VALS(gcem::erf, std::erf, 3.0L);
Expand Down
2 changes: 2 additions & 0 deletions tests/erf_inv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
##
################################################################################*/

#define TEST_ERR_TOL 1e-12

#define TEST_PRINT_PRECISION_1 6
#define TEST_PRINT_PRECISION_2 18

Expand Down
2 changes: 2 additions & 0 deletions tests/incomplete_gamma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
##
################################################################################*/

#define TEST_ERR_TOL 1e-12

#define TEST_PRINT_PRECISION_1 3
#define TEST_PRINT_PRECISION_2 18

Expand Down
2 changes: 2 additions & 0 deletions tests/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ int main()
GCEM_TEST_COMPARE_VALS(gcem::log,std::log, 41.5L);
GCEM_TEST_COMPARE_VALS(gcem::log,std::log, 0.0L);
GCEM_TEST_COMPARE_VALS(gcem::log,std::log, -1.0L);
GCEM_TEST_COMPARE_VALS(gcem::log,std::log, 1e-500L);
GCEM_TEST_COMPARE_VALS(gcem::log,std::log, std::numeric_limits<long double>::min());

GCEM_TEST_COMPARE_VALS(gcem::log,std::log, -std::numeric_limits<long double>::infinity());
GCEM_TEST_COMPARE_VALS(gcem::log,std::log, std::numeric_limits<long double>::infinity());
Expand Down
2 changes: 2 additions & 0 deletions tests/log10.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ int main()
GCEM_TEST_COMPARE_VALS(gcem::log10, std::log10, 41.5L);
GCEM_TEST_COMPARE_VALS(gcem::log10, std::log10, 0.0L);
GCEM_TEST_COMPARE_VALS(gcem::log10, std::log10, -1.0L);
GCEM_TEST_COMPARE_VALS(gcem::log10, std::log10, 1e-500L);
GCEM_TEST_COMPARE_VALS(gcem::log10, std::log10, std::numeric_limits<long double>::min());

GCEM_TEST_COMPARE_VALS(gcem::log10, std::log10, -std::numeric_limits<long double>::infinity());
GCEM_TEST_COMPARE_VALS(gcem::log10, std::log10, std::numeric_limits<long double>::infinity());
Expand Down
2 changes: 2 additions & 0 deletions tests/log2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ int main()
GCEM_TEST_COMPARE_VALS(gcem::log2, std::log2, 41.5L);
GCEM_TEST_COMPARE_VALS(gcem::log2, std::log2, 0.0L);
GCEM_TEST_COMPARE_VALS(gcem::log2, std::log2, -1.0L);
GCEM_TEST_COMPARE_VALS(gcem::log2,std::log2, 1e-500L);
GCEM_TEST_COMPARE_VALS(gcem::log2,std::log2, std::numeric_limits<long double>::min());

GCEM_TEST_COMPARE_VALS(gcem::log2, std::log2, -std::numeric_limits<long double>::infinity());
GCEM_TEST_COMPARE_VALS(gcem::log2, std::log2, std::numeric_limits<long double>::infinity());
Expand Down
2 changes: 0 additions & 2 deletions tests/signbit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ int main()

//



GCEM_TEST_COMPARE_VALS(gcem::signbit,std_test_fn, 1.0);
GCEM_TEST_COMPARE_VALS(gcem::signbit,std_test_fn, -1.0);

Expand Down

0 comments on commit 6251231

Please sign in to comment.