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
9a775bcb
Unverified
Commit
9a775bcb
authored
Jun 25, 2019
by
Niels Lohmann
Committed by
GitHub
Jun 25, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1570 from nickaein/msvc-regression-tests
Regression tests for MSVC
parents
39011a17
5b2e2305
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
6 deletions
+71
-6
appveyor.yml
appveyor.yml
+48
-3
include/nlohmann/detail/iterators/iter_impl.hpp
include/nlohmann/detail/iterators/iter_impl.hpp
+10
-0
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+10
-0
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.
appveyor.yml
View file @
9a775bcb
...
...
@@ -3,6 +3,21 @@ version: '{build}'
environment
:
matrix
:
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2015
configuration
:
Debug
platform
:
x86
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
GENERATOR
:
Visual Studio 14
2015
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2017
configuration
:
Debug
platform
:
x86
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
GENERATOR
:
Visual Studio 15
2017
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2015
configuration
:
Debug
COMPILER
:
mingw
platform
:
x86
CXX_FLAGS
:
"
"
...
...
@@ -10,36 +25,58 @@ environment:
GENERATOR
:
Ninja
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2015
configuration
:
Release
COMPILER
:
mingw
platform
:
x86
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
GENERATOR
:
Ninja
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2015
configuration
:
Release
platform
:
x86
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
GENERATOR
:
Visual Studio 14
2015
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2015
configuration
:
Release
platform
:
x86
name
:
with_win_header
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
GENERATOR
:
Visual Studio 14
2015
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2017
configuration
:
Release
platform
:
x86
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
GENERATOR
:
Visual Studio 15
2017
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2017
configuration
:
Release
platform
:
x86
CXX_FLAGS
:
"
/permissive-
/std:c++latest
/utf-8"
LINKER_FLAGS
:
"
"
GENERATOR
:
Visual Studio 15
2017
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2015
configuration
:
Release
platform
:
x64
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
GENERATOR
:
Visual Studio 14 2015 Win64
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2017
configuration
:
Release
platform
:
x64
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
GENERATOR
:
Visual Studio 15 2017 Win64
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2017
configuration
:
Release
platform
:
x64
CXX_FLAGS
:
"
/permissive-
/std:c++latest
/utf-8
/F4000000"
LINKER_FLAGS
:
"
/STACK:4000000"
...
...
@@ -57,10 +94,18 @@ install:
-
if "%COMPILER%"=="mingw" g++ --version
before_build
:
-
cmake . -G "%GENERATOR%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_EXE_LINKER_FLAGS="%LINKER_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin"
# for with_win_header build, inject the inclusion of Windows.h to the single-header library
-
ps
:
if ($env:name -Eq "with_win_header") { $header_path = "single_include\nlohmann\json.hpp" }
-
ps
:
if ($env:name -Eq "with_win_header") { "#include <Windows.h>`n" + (Get-Content $header_path | Out-String) | Set-Content $header_path }
-
cmake . -G "%GENERATOR%" -DCMAKE_BUILD_TYPE="%configuration%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_EXE_LINKER_FLAGS="%LINKER_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin"
build_script
:
-
cmake --build . --config
Release
-
cmake --build . --config
"%configuration%"
test_script
:
-
ctest -C Release -V -j
-
if "%configuration%"=="Release" ctest -C "%configuration%" -V -j
# On Debug builds, skip test-unicode_all
# as it is extremely slow to run and cause
# occasional timeouts on AppVeyor.
# More info: https://github.com/nlohmann/json/pull/1570
-
if "%configuration%"=="Debug" ctest --exclude-regex "test-unicode_all" -C "%configuration%" -V -j
include/nlohmann/detail/iterators/iter_impl.hpp
View file @
9a775bcb
...
...
@@ -118,6 +118,16 @@ class iter_impl
to iterator is not defined.
*/
/*!
@brief const copy constructor
@param[in] other const iterator to copy from
@note This copy constuctor had to be defined explicitely to circumvent a bug
occuring on msvc v19.0 compiler (VS 2015) debug build. For more
information refer to: https://github.com/nlohmann/json/issues/1608
*/
iter_impl
(
const
iter_impl
<
const
BasicJsonType
>&
other
)
noexcept
:
m_object
(
other
.
m_object
),
m_it
(
other
.
m_it
)
{}
/*!
@brief converting constructor
@param[in] other non-const iterator to copy from
...
...
single_include/nlohmann/json.hpp
View file @
9a775bcb
...
...
@@ -7821,6 +7821,16 @@ class iter_impl
to iterator is not defined.
*/
/*!
@brief const copy constructor
@param[in] other const iterator to copy from
@note This copy constuctor had to be defined explicitely to circumvent a bug
occuring on msvc v19.0 compiler (VS 2015) debug build. For more
information refer to: https://github.com/nlohmann/json/issues/1608
*/
iter_impl
(
const
iter_impl
<
const
BasicJsonType
>&
other
)
noexcept
:
m_object
(
other
.
m_object
),
m_it
(
other
.
m_it
)
{}
/*!
@brief converting constructor
@param[in] other non-const iterator to copy from
...
...
test/src/unit-concepts.cpp
View file @
9a775bcb
...
...
@@ -73,8 +73,8 @@ TEST_CASE("concepts")
// X::size_type must return an unsigned integer
CHECK
((
std
::
is_unsigned
<
json
::
size_type
>::
value
));
// 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
())
<=
std
::
numeric_limits
<
json
::
size_type
>::
max
());
CHECK
(
static_cast
<
json
::
size_type
>
(
(
std
::
numeric_limits
<
json
::
difference_type
>::
max
)
())
<=
(
std
::
numeric_limits
<
json
::
size_type
>::
max
)
());
// the expression "X u" has the post-condition "u.empty()"
{
...
...
test/src/unit-regression.cpp
View file @
9a775bcb
...
...
@@ -719,7 +719,7 @@ TEST_CASE("regression tests")
};
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)
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