Skip to content

Commit dd04b5e

Browse files
authored
Merge pull request #107 from mumbleskates/main
Testing changes and fixes
2 parents 1663eff + 1ad817e commit dd04b5e

16 files changed

+70
-12
lines changed

tests/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,18 @@ 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)
60+
fast_float_add_cpp_test(powersoffive_hardround)
61+
fast_float_add_cpp_test(string_test)
5962

6063

6164

6265
option(FASTFLOAT_EXHAUSTIVE "Exhaustive tests" OFF)
6366

6467
if (FASTFLOAT_EXHAUSTIVE)
65-
fast_float_add_cpp_test(powersoffive_hardround)
6668
fast_float_add_cpp_test(short_random_string)
6769
fast_float_add_cpp_test(exhaustive32_midpoint)
6870
fast_float_add_cpp_test(random_string)
69-
fast_float_add_cpp_test(string_test)
7071
fast_float_add_cpp_test(exhaustive32)
7172
fast_float_add_cpp_test(exhaustive32_64)
7273
fast_float_add_cpp_test(long_exhaustive32)

tests/basictest.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
#include <doctest/doctest.h>
44

55
#include "fast_float/fast_float.h"
6+
#include <cmath>
7+
#include <cstdio>
68
#include <iomanip>
9+
#include <ios>
10+
#include <limits>
711
#include <string>
12+
#include <system_error>
813

914
#ifndef SUPPLEMENTAL_TEST_DATA_DIR
1015
#define SUPPLEMENTAL_TEST_DATA_DIR "data/"

tests/example_comma_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
#include "fast_float/fast_float.h"
33
#include <iostream>
4+
#include <string>
5+
#include <system_error>
46

57
int main() {
68
const std::string input = "3,1416 xyz ";

tests/example_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
#include "fast_float/fast_float.h"
33
#include <iostream>
4+
#include <string>
5+
#include <system_error>
46

57
int main() {
68
const std::string input = "3.1416 xyz ";

tests/exhaustive32.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11

22
#include "fast_float/fast_float.h"
33

4-
#include <iostream>
54
#include <cassert>
65
#include <cmath>
6+
#include <cstdio>
7+
#include <ios>
8+
#include <iostream>
9+
#include <limits>
10+
#include <system_error>
711

812
template <typename T> char *to_string(T d, char *buffer) {
913
auto written = std::snprintf(buffer, 64, "%.*e",

tests/exhaustive32_64.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11

22
#include "fast_float/fast_float.h"
33

4-
#include <iostream>
54
#include <cassert>
65
#include <cmath>
6+
#include <cstdio>
7+
#include <ios>
8+
#include <iostream>
9+
#include <limits>
10+
#include <string>
11+
#include <system_error>
712

813
template <typename T> char *to_string(T d, char *buffer) {
914
auto written = std::snprintf(buffer, 64, "%.*e",

tests/exhaustive32_midpoint.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
#include "fast_float/fast_float.h"
22

3-
#include <iostream>
43
#include <cassert>
54
#include <cmath>
5+
#include <cstdio>
6+
#include <ios>
7+
#include <iostream>
8+
#include <limits>
9+
#include <stdexcept>
610

711
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__)
812
// Anything at all that is related to cygwin, msys and so forth will

tests/long_exhaustive32.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11

22
#include "fast_float/fast_float.h"
33

4-
#include <iostream>
54
#include <cassert>
65
#include <cmath>
6+
#include <cstdio>
7+
#include <ios>
8+
#include <iostream>
9+
#include <system_error>
710

811
template <typename T> char *to_string(T d, char *buffer) {
912
auto written = std::snprintf(buffer, 128, "%.*e",

tests/long_exhaustive32_64.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#include "fast_float/fast_float.h"
22

3-
#include <iostream>
43
#include <cassert>
54
#include <cmath>
5+
#include <cstdio>
6+
#include <ios>
7+
#include <iostream>
68

79
template <typename T> char *to_string(T d, char *buffer) {
810
auto written = std::snprintf(buffer, 128, "%.*e",

tests/long_random64.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
#include "fast_float/fast_float.h"
22

3-
#include <iostream>
43
#include <cassert>
54
#include <cmath>
5+
#include <cstdio>
6+
#include <ios>
7+
#include <iostream>
8+
#include <system_error>
69

710
template <typename T> char *to_string(T d, char *buffer) {
811
auto written = std::snprintf(buffer, 128, "%.*e",

0 commit comments

Comments
 (0)