Skip to content

Commit

Permalink
More tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Sep 14, 2023
1 parent 2eb7b2e commit a79f2d9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/rcppfastfloat_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ bool eddelbuettel() {
"-Inf",
"+2.2",
"1d+4",
"1d-1"};
"1d-1",
"0."
"-.1",
"+.1"};
std::vector<std::pair<bool, double>> expected_results = {
{true, std::numeric_limits<double>::infinity()},
{true, 3.16227766016838},
Expand Down Expand Up @@ -64,7 +67,11 @@ bool eddelbuettel() {
{true, -std::numeric_limits<double>::infinity()},
{true, 2.2},
{false, -1},
{false, -1}};
{false, -1},
{true, 0},
{true, -0.1},
{true, 0.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 a79f2d9

Please sign in to comment.