From cd5160a0079efbd7c7ad5afe3aaa6a0ee5358a99 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Thu, 14 Sep 2023 10:32:59 -0400 Subject: [PATCH] Adding more tests. --- tests/rcppfastfloat_test.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/rcppfastfloat_test.cpp b/tests/rcppfastfloat_test.cpp index 457903de..717f5603 100644 --- a/tests/rcppfastfloat_test.cpp +++ b/tests/rcppfastfloat_test.cpp @@ -37,9 +37,11 @@ bool eddelbuettel() { "+2.2", "1d+4", "1d-1", - "0." + "0.", "-.1", - "+.1"}; + "+.1", + "1e+1", + "+1e1"}; std::vector> expected_results = { {true, std::numeric_limits::infinity()}, {true, 3.16227766016838}, @@ -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 expected = expected_results[i]; double result; // answer contains a error code and a pointer to the end of the