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
eba8244e
Commit
eba8244e
authored
Jun 22, 2019
by
Isaac Nickaein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid collision of ::max with windows.h macro
parent
798e83a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
test/src/unit-concepts.cpp
test/src/unit-concepts.cpp
+2
-2
test/src/unit-regression.cpp
test/src/unit-regression.cpp
+1
-1
No files found.
test/src/unit-concepts.cpp
View file @
eba8244e
...
@@ -73,8 +73,8 @@ TEST_CASE("concepts")
...
@@ -73,8 +73,8 @@ TEST_CASE("concepts")
// X::size_type must return an unsigned integer
// X::size_type must return an unsigned integer
CHECK
((
std
::
is_unsigned
<
json
::
size_type
>::
value
));
CHECK
((
std
::
is_unsigned
<
json
::
size_type
>::
value
));
// X::size_type can represent any non-negative value of X::difference_type
// X::size_type can represent any non-negative value of X::difference_type
CHECK
(
static_cast
<
json
::
size_type
>
(
std
::
numeric_limits
<
json
::
difference_type
>::
max
())
<=
CHECK
(
static_cast
<
json
::
size_type
>
(
(
std
::
numeric_limits
<
json
::
difference_type
>::
max
)
())
<=
std
::
numeric_limits
<
json
::
size_type
>::
max
());
(
std
::
numeric_limits
<
json
::
size_type
>::
max
)
());
// the expression "X u" has the post-condition "u.empty()"
// the expression "X u" has the post-condition "u.empty()"
{
{
...
...
test/src/unit-regression.cpp
View file @
eba8244e
...
@@ -719,7 +719,7 @@ TEST_CASE("regression tests")
...
@@ -719,7 +719,7 @@ TEST_CASE("regression tests")
};
};
check_roundtrip
(
100000000000.1236
);
check_roundtrip
(
100000000000.1236
);
check_roundtrip
(
std
::
numeric_limits
<
json
::
number_float_t
>::
max
());
check_roundtrip
(
(
std
::
numeric_limits
<
json
::
number_float_t
>::
max
)
());
// Some more numbers which fail to roundtrip when serialized with digits10 significand digits (instead of max_digits10)
// Some more numbers which fail to roundtrip when serialized with digits10 significand digits (instead of max_digits10)
check_roundtrip
(
1.541888611948064e-17
);
check_roundtrip
(
1.541888611948064e-17
);
...
...
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