More tests.

This commit is contained in:
Daniel Lemire 2023-09-14 10:28:08 -04:00
parent 2eb7b2ebda
commit a79f2d9841

View File

@ -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},
@ -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];