Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
a4a88b1b
Commit
a4a88b1b
authored
Jan 26, 2016
by
Trevor Welsby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #195 - update Travis to Trusty due to gcc/clang strtod() bug
parent
2b137110
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
335 additions
and
741 deletions
+335
-741
.travis.yml
.travis.yml
+4
-3
src/json.hpp
src/json.hpp
+331
-734
test/unit.cpp
test/unit.cpp
+0
-4
No files found.
.travis.yml
View file @
a4a88b1b
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
:
...
@@ -33,7 +34,7 @@ matrix:
...
@@ -33,7 +34,7 @@ matrix:
compiler
:
clang
compiler
:
clang
addons
:
addons
:
apt
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
,
'
llvm-toolchain-
precise
-3.6'
]
sources
:
[
'
ubuntu-toolchain-r-test'
,
'
llvm-toolchain-
trusty
-3.6'
]
packages
:
[
'
clang-3.6'
,
'
valgrind'
]
packages
:
[
'
clang-3.6'
,
'
valgrind'
]
env
:
COMPILER=clang++-3.6
env
:
COMPILER=clang++-3.6
...
@@ -41,7 +42,7 @@ matrix:
...
@@ -41,7 +42,7 @@ matrix:
compiler
:
clang
compiler
:
clang
addons
:
addons
:
apt
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
,
'
llvm-toolchain-
precise
-3.7'
]
sources
:
[
'
ubuntu-toolchain-r-test'
,
'
llvm-toolchain-
trusty
-3.7'
]
packages
:
[
'
clang-3.7'
,
'
valgrind'
]
packages
:
[
'
clang-3.7'
,
'
valgrind'
]
env
:
COMPILER=clang++-3.7
env
:
COMPILER=clang++-3.7
...
...
src/json.hpp
View file @
a4a88b1b
This diff is collapsed.
Click to expand it.
test/unit.cpp
View file @
a4a88b1b
...
@@ -11572,12 +11572,8 @@ TEST_CASE("regression tests")
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment