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
176e9bf0
Unverified
Commit
176e9bf0
authored
3 years ago
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tests for CBOR
parent
b74474e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
include/nlohmann/detail/input/binary_reader.hpp
include/nlohmann/detail/input/binary_reader.hpp
+1
-1
test/src/unit-cbor.cpp
test/src/unit-cbor.cpp
+3
-0
No files found.
include/nlohmann/detail/input/binary_reader.hpp
View file @
176e9bf0
...
@@ -791,7 +791,7 @@ class binary_reader
...
@@ -791,7 +791,7 @@ class binary_reader
break
;
break
;
}
}
default:
default:
break
;
return
parse_cbor_internal
(
true
,
tag_handler
)
;
}
}
get
();
get
();
return
get_cbor_binary
(
b
)
&&
sax
->
binary
(
b
);
return
get_cbor_binary
(
b
)
&&
sax
->
binary
(
b
);
...
...
This diff is collapsed.
Click to expand it.
test/src/unit-cbor.cpp
View file @
176e9bf0
...
@@ -2572,6 +2572,9 @@ TEST_CASE("Tagged values")
...
@@ -2572,6 +2572,9 @@ TEST_CASE("Tagged values")
// check that parsing succeeds and gets original value in ignore mode
// check that parsing succeeds and gets original value in ignore mode
auto
j_tagged
=
json
::
from_cbor
(
v_tagged
,
true
,
true
,
json
::
cbor_tag_handler_t
::
ignore
);
auto
j_tagged
=
json
::
from_cbor
(
v_tagged
,
true
,
true
,
json
::
cbor_tag_handler_t
::
ignore
);
CHECK
(
j_tagged
==
j
);
CHECK
(
j_tagged
==
j
);
auto
j_tagged_stored
=
json
::
from_cbor
(
v_tagged
,
true
,
true
,
json
::
cbor_tag_handler_t
::
store
);
CHECK
(
j_tagged_stored
==
j
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
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