mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 16:56:57 +08:00
Fix long_test and add it to the non-exhaustive test suite
This commit is contained in:
parent
3219e3ce4c
commit
6ec3ace497
@ -56,6 +56,7 @@ endfunction(fast_float_add_cpp_test)
|
||||
fast_float_add_cpp_test(example_test)
|
||||
fast_float_add_cpp_test(example_comma_test)
|
||||
fast_float_add_cpp_test(basictest)
|
||||
fast_float_add_cpp_test(long_test)
|
||||
fast_float_add_cpp_test(powersoffive_hardround)
|
||||
fast_float_add_cpp_test(string_test)
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#include "fast_float/fast_float.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
inline void Assert(bool Assertion) {
|
||||
@ -14,6 +15,7 @@ bool test() {
|
||||
const char * end = input.data() + input.size();
|
||||
for(size_t i = 0; i < answers.size(); i++) {
|
||||
T result_value;
|
||||
while((begin < end) && (std::isspace(*begin))) { begin++; }
|
||||
auto result = fast_float::from_chars(begin, end,
|
||||
result_value);
|
||||
if (result.ec != std::errc()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user