Skip to content

Commit

Permalink
Adding more tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Sep 14, 2023
1 parent a79f2d9 commit cd5160a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/rcppfastfloat_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ bool eddelbuettel() {
"+2.2",
"1d+4",
"1d-1",
"0."
"0.",
"-.1",
"+.1"};
"+.1",
"1e+1",
"+1e1"};
std::vector<std::pair<bool, double>> expected_results = {
{true, std::numeric_limits<double>::infinity()},
{true, 3.16227766016838},
Expand Down Expand Up @@ -71,9 +73,11 @@ bool eddelbuettel() {
{true, 0},
{true, -0.1},
{true, 0.1},
{true, 10},
{true, 10},
};
for (size_t i = 0; i < inputs.size(); i++) {
std::string &input = inputs[i];
const std::string &input = inputs[i];
std::pair<bool, double> expected = expected_results[i];
double result;
// answer contains a error code and a pointer to the end of the
Expand Down

0 comments on commit cd5160a

Please sign in to comment.