Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
f79d52b9
Commit
f79d52b9
authored
Jan 24, 2016
by
Trevor Welsby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DEBUG ONLY: DUMP INFO FROM TRAVIS
parent
c1f5f045
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
unit.cpp
test/unit.cpp
+7
-0
No files found.
test/unit.cpp
View file @
f79d52b9
...
...
@@ -11521,6 +11521,13 @@ TEST_CASE("regression tests")
j
=
json
::
parse
(
"1.00000000000000011102230246251565404236316680908203126"
);
CHECK
(
j
.
get
<
double
>
()
==
1.00000000000000022
);
union
double_union
{
double
_double
;
uint64_t
_uint64_t
;
};
double_union
A
,
B
;
A
.
_double
=
1.00000000000000022
;
B
.
_double
=
j
.
get
<
double
>
();
std
::
cout
<<
"Literal -> "
<<
std
::
hex
<<
A
.
_uint64_t
<<
std
::
endl
;
std
::
cout
<<
"Parsed -> "
<<
std
::
hex
<<
B
.
_uint64_t
<<
std
::
endl
;
std
::
cout
<<
"Type == "
<<
std
::
dec
<<
static_cast
<
int
>
(
j
.
type
())
<<
std
::
endl
;
j
=
json
::
parse
(
"7205759403792793199999e-5"
);
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