Skip to content

Commit 6ec3ace

Browse files
committed
Fix long_test and add it to the non-exhaustive test suite
1 parent 3219e3c commit 6ec3ace

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ endfunction(fast_float_add_cpp_test)
5656
fast_float_add_cpp_test(example_test)
5757
fast_float_add_cpp_test(example_comma_test)
5858
fast_float_add_cpp_test(basictest)
59+
fast_float_add_cpp_test(long_test)
5960
fast_float_add_cpp_test(powersoffive_hardround)
6061
fast_float_add_cpp_test(string_test)
6162

tests/long_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "fast_float/fast_float.h"
22

3+
#include <iostream>
34
#include <vector>
45

56
inline void Assert(bool Assertion) {
@@ -14,6 +15,7 @@ bool test() {
1415
const char * end = input.data() + input.size();
1516
for(size_t i = 0; i < answers.size(); i++) {
1617
T result_value;
18+
while((begin < end) && (std::isspace(*begin))) { begin++; }
1719
auto result = fast_float::from_chars(begin, end,
1820
result_value);
1921
if (result.ec != std::errc()) {

0 commit comments

Comments
 (0)