mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 16:56:57 +08:00
More tests.
This commit is contained in:
parent
2eb7b2ebda
commit
a79f2d9841
@ -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];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user