Merge pull request #196 from twelsby/issue195
Issue #195 - update Travis to Trusty due to gcc/clang strtod() bug
This commit is contained in:
commit
077fb1d540
3 changed files with 378 additions and 784 deletions
|
@ -1,6 +1,7 @@
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
sudo: false
|
dist: trusty
|
||||||
|
sudo: required
|
||||||
|
|
||||||
# from http://stackoverflow.com/a/32127147/266378
|
# from http://stackoverflow.com/a/32127147/266378
|
||||||
matrix:
|
matrix:
|
||||||
|
|
1153
src/json.hpp
1153
src/json.hpp
File diff suppressed because it is too large
Load diff
|
@ -11572,12 +11572,8 @@ TEST_CASE("regression tests")
|
||||||
j = json::parse("0.999999999999999944488848768742172978818416595458984374");
|
j = json::parse("0.999999999999999944488848768742172978818416595458984374");
|
||||||
CHECK(j.get<double>() == 0.99999999999999989);
|
CHECK(j.get<double>() == 0.99999999999999989);
|
||||||
|
|
||||||
// Test fails under GCC/clang due to strtod() error (may originate in libstdc++
|
|
||||||
// but seems to have been fixed in the most current versions - just not on Travis)
|
|
||||||
#if !defined(__clang__) && !defined(__GNUC__) && !defined(__GNUG__)
|
|
||||||
j = json::parse("1.00000000000000011102230246251565404236316680908203126");
|
j = json::parse("1.00000000000000011102230246251565404236316680908203126");
|
||||||
CHECK(j.get<double>() == 1.00000000000000022);
|
CHECK(j.get<double>() == 1.00000000000000022);
|
||||||
#endif
|
|
||||||
|
|
||||||
j = json::parse("7205759403792793199999e-5");
|
j = json::parse("7205759403792793199999e-5");
|
||||||
CHECK(j.get<double>() == 72057594037927928.0);
|
CHECK(j.get<double>() == 72057594037927928.0);
|
||||||
|
|
Loading…
Reference in a new issue