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
ecf84ddd
Commit
ecf84ddd
authored
Jun 22, 2016
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test case for #269
parent
59e67e76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
README.md
README.md
+1
-1
test/src/unit.cpp
test/src/unit.cpp
+9
-0
No files found.
README.md
View file @
ecf84ddd
...
...
@@ -453,7 +453,7 @@ $ make
$
./json_unit
"*"
===============================================================================
All tests passed
(
55687
05 assertions
in
31
test
cases
)
All tests passed
(
55687
22 assertions
in
32
test
cases
)
```
For more information, have a look at the file
[
.travis.yml
](
https://github.com/nlohmann/json/blob/master/.travis.yml
)
.
test/src/unit.cpp
View file @
ecf84ddd
...
...
@@ -14073,6 +14073,15 @@ TEST_CASE("regression tests")
CHECK
(
data
==
json
({{
"key"
,
"value"
},
{
"key2"
,
"value2"
},
{
"key3"
,
"value3"
}}));
}
SECTION
(
"issue #269 - diff generates incorrect patch when removing multiple array elements"
)
{
json
doc
=
R"( { "arr1": [1, 2, 3, 4] } )"
_json
;
json
expected
=
R"( { "arr1": [1, 2] } )"
_json
;
// check roundtrip
CHECK
(
doc
.
patch
(
json
::
diff
(
doc
,
expected
))
==
expected
);
}
}
// special test case to check if memory is leaked if constructor throws
...
...
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