Skip to content

Commit deaa74d

Browse files
committed
Re-enabling tests generally.
1 parent 88da62b commit deaa74d

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ steps:
99
CXX: g++
1010
BUILD_FLAGS: -- -j
1111
CMAKE_FLAGS: -DSIMDJSON_BUILD_STATIC=ON
12-
CTEST_FLAGS: -j4 --output-on-failure -E checkperf -E numberparsingcheck # A ULP marging 1 is detected on 32-bit GCC
12+
CTEST_FLAGS: -j4 --output-on-failure -E checkperf
1313
commands:
1414
- apt-get update -qq
1515
- apt-get install -y g++ cmake gcc

src/generic/stage2/numberparsing.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
namespace stage2 {
22
namespace numberparsing {
3-
3+
#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0)
4+
#warning "Your floating-point rounding default is inadequate and may lead to inexact parsing."
5+
#endif
46
// Attempts to compute i * 10^(power) exactly; and if "negative" is
57
// true, negate the result.
68
// This function will only work in some cases, when it does not work, success is

tests/numberparsingcheck.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,12 @@ bool validate(const char *dirname) {
208208
}
209209

210210
int main(int argc, char *argv[]) {
211+
#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0)
212+
std::cout << "Your floating-point rounding default is inadequate and may lead to inexact parsing." << std::endl;
213+
std::cout << "We are not going to check number parsing precision." << std::endl;
214+
std::cout << "We are returning with a success condition nevertheless (to avoid noisy failing tests)." << std::endl;
215+
return EXIT_SUCCESS;
216+
#endif
211217
if (argc != 2) {
212218
std::cerr << "Usage: " << argv[0] << " <directorywithjsonfiles>"
213219
<< std::endl;

0 commit comments

Comments
 (0)