Skip to content

Commit

Permalink
Adding a couple of tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Sep 14, 2023
1 parent 6a390f6 commit 2eb7b2e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/rcppfastfloat_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ bool eddelbuettel() {
"NaN",
"",
"-Inf",
"+2.2"};
"+2.2",
"1d+4",
"1d-1"};
std::vector<std::pair<bool, double>> expected_results = {
{true, std::numeric_limits<double>::infinity()},
{true, 3.16227766016838},
Expand All @@ -60,7 +62,9 @@ bool eddelbuettel() {
{true, std::numeric_limits<double>::quiet_NaN()},
{false, -1},
{true, -std::numeric_limits<double>::infinity()},
{true, 2.2}};
{true, 2.2},
{false, -1},
{false, -1}};
for (size_t i = 0; i < inputs.size(); i++) {
std::string &input = inputs[i];
std::pair<bool, double> expected = expected_results[i];
Expand Down

0 comments on commit 2eb7b2e

Please sign in to comment.