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
42be2edd
Commit
42be2edd
authored
Sep 01, 2016
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed test coverage
parent
c8d01fa7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
doc/images/scanner.png
doc/images/scanner.png
+0
-0
test/src/unit-deserialization.cpp
test/src/unit-deserialization.cpp
+16
-0
No files found.
doc/images/scanner.png
0 → 100644
View file @
42be2edd
645 KB
test/src/unit-deserialization.cpp
View file @
42be2edd
...
...
@@ -223,5 +223,21 @@ TEST_CASE("deserialization")
CHECK_THROWS_AS
(
json
::
parse
(
std
::
begin
(
v
),
std
::
end
(
v
)),
std
::
invalid_argument
);
}
}
// these cases are required for 100% line coverage
SECTION
(
"error cases"
)
{
SECTION
(
"case 1"
)
{
uint8_t
v
[]
=
{
'\"'
,
'a'
,
'a'
,
'a'
,
'a'
,
'a'
,
'a'
,
'\\'
,
'u'
};
CHECK_THROWS_AS
(
json
::
parse
(
std
::
begin
(
v
),
std
::
end
(
v
)),
std
::
invalid_argument
);
}
SECTION
(
"case 2"
)
{
uint8_t
v
[]
=
{
'\"'
,
'a'
,
'a'
,
'a'
,
'a'
,
'a'
,
'a'
,
'\\'
,
'u'
,
'1'
};
CHECK_THROWS_AS
(
json
::
parse
(
std
::
begin
(
v
),
std
::
end
(
v
)),
std
::
invalid_argument
);
}
}
}
}
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