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
1f381d49
Commit
1f381d49
authored
May 09, 2015
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
overworked coverage
parent
bb142d6c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
38 deletions
+23
-38
src/json.hpp
src/json.hpp
+22
-22
src/json.hpp.re2c
src/json.hpp.re2c
+1
-1
test/unit.cpp
test/unit.cpp
+0
-15
No files found.
src/json.hpp
View file @
1f381d49
...
@@ -3666,8 +3666,8 @@ class basic_json
...
@@ -3666,8 +3666,8 @@ class basic_json
if
((
m_limit
-
m_cursor
)
<
5
)
if
((
m_limit
-
m_cursor
)
<
5
)
{
{
yyfill
();
yyfill
();
// LCOV_EXCL_LINE;
}
;
}
yych
=
*
m_cursor
;
yych
=
*
m_cursor
;
if
(
yych
<=
'9'
)
if
(
yych
<=
'9'
)
{
{
...
@@ -3801,8 +3801,8 @@ basic_json_parser_4:
...
@@ -3801,8 +3801,8 @@ basic_json_parser_4:
++
m_cursor
;
++
m_cursor
;
if
(
m_limit
<=
m_cursor
)
if
(
m_limit
<=
m_cursor
)
{
{
yyfill
();
yyfill
();
// LCOV_EXCL_LINE;
}
;
}
yych
=
*
m_cursor
;
yych
=
*
m_cursor
;
basic_json_parser_5:
basic_json_parser_5:
if
(
yybm
[
0
+
yych
]
&
32
)
if
(
yybm
[
0
+
yych
]
&
32
)
...
@@ -3946,8 +3946,8 @@ basic_json_parser_30:
...
@@ -3946,8 +3946,8 @@ basic_json_parser_30:
++
m_cursor
;
++
m_cursor
;
if
(
m_limit
<=
m_cursor
)
if
(
m_limit
<=
m_cursor
)
{
{
yyfill
();
yyfill
();
// LCOV_EXCL_LINE;
}
;
}
yych
=
*
m_cursor
;
yych
=
*
m_cursor
;
basic_json_parser_31:
basic_json_parser_31:
if
(
yybm
[
0
+
yych
]
&
64
)
if
(
yybm
[
0
+
yych
]
&
64
)
...
@@ -3977,8 +3977,8 @@ basic_json_parser_33:
...
@@ -3977,8 +3977,8 @@ basic_json_parser_33:
++
m_cursor
;
++
m_cursor
;
if
(
m_limit
<=
m_cursor
)
if
(
m_limit
<=
m_cursor
)
{
{
yyfill
();
yyfill
();
// LCOV_EXCL_LINE;
}
;
}
yych
=
*
m_cursor
;
yych
=
*
m_cursor
;
if
(
yych
<=
'e'
)
if
(
yych
<=
'e'
)
{
{
...
@@ -4061,8 +4061,8 @@ basic_json_parser_36:
...
@@ -4061,8 +4061,8 @@ basic_json_parser_36:
++
m_cursor
;
++
m_cursor
;
if
(
m_limit
<=
m_cursor
)
if
(
m_limit
<=
m_cursor
)
{
{
yyfill
();
yyfill
();
// LCOV_EXCL_LINE;
}
;
}
yych
=
*
m_cursor
;
yych
=
*
m_cursor
;
if
(
yych
<=
'@'
)
if
(
yych
<=
'@'
)
{
{
...
@@ -4094,8 +4094,8 @@ basic_json_parser_37:
...
@@ -4094,8 +4094,8 @@ basic_json_parser_37:
++
m_cursor
;
++
m_cursor
;
if
(
m_limit
<=
m_cursor
)
if
(
m_limit
<=
m_cursor
)
{
{
yyfill
();
yyfill
();
// LCOV_EXCL_LINE;
}
;
}
yych
=
*
m_cursor
;
yych
=
*
m_cursor
;
if
(
yych
<=
'@'
)
if
(
yych
<=
'@'
)
{
{
...
@@ -4127,8 +4127,8 @@ basic_json_parser_38:
...
@@ -4127,8 +4127,8 @@ basic_json_parser_38:
++
m_cursor
;
++
m_cursor
;
if
(
m_limit
<=
m_cursor
)
if
(
m_limit
<=
m_cursor
)
{
{
yyfill
();
yyfill
();
// LCOV_EXCL_LINE;
}
;
}
yych
=
*
m_cursor
;
yych
=
*
m_cursor
;
if
(
yych
<=
'@'
)
if
(
yych
<=
'@'
)
{
{
...
@@ -4160,8 +4160,8 @@ basic_json_parser_39:
...
@@ -4160,8 +4160,8 @@ basic_json_parser_39:
++
m_cursor
;
++
m_cursor
;
if
(
m_limit
<=
m_cursor
)
if
(
m_limit
<=
m_cursor
)
{
{
yyfill
();
yyfill
();
// LCOV_EXCL_LINE;
}
;
}
yych
=
*
m_cursor
;
yych
=
*
m_cursor
;
if
(
yych
<=
'@'
)
if
(
yych
<=
'@'
)
{
{
...
@@ -4196,8 +4196,8 @@ basic_json_parser_40:
...
@@ -4196,8 +4196,8 @@ basic_json_parser_40:
m_marker
=
++
m_cursor
;
m_marker
=
++
m_cursor
;
if
((
m_limit
-
m_cursor
)
<
3
)
if
((
m_limit
-
m_cursor
)
<
3
)
{
{
yyfill
();
yyfill
();
// LCOV_EXCL_LINE;
}
;
}
yych
=
*
m_cursor
;
yych
=
*
m_cursor
;
basic_json_parser_41:
basic_json_parser_41:
if
(
yybm
[
0
+
yych
]
&
128
)
if
(
yybm
[
0
+
yych
]
&
128
)
...
@@ -4273,8 +4273,8 @@ basic_json_parser_45:
...
@@ -4273,8 +4273,8 @@ basic_json_parser_45:
++
m_cursor
;
++
m_cursor
;
if
(
m_limit
<=
m_cursor
)
if
(
m_limit
<=
m_cursor
)
{
{
yyfill
();
yyfill
();
// LCOV_EXCL_LINE;
}
;
}
yych
=
*
m_cursor
;
yych
=
*
m_cursor
;
if
(
yych
<=
'/'
)
if
(
yych
<=
'/'
)
{
{
...
@@ -4290,8 +4290,8 @@ basic_json_parser_47:
...
@@ -4290,8 +4290,8 @@ basic_json_parser_47:
m_marker
=
++
m_cursor
;
m_marker
=
++
m_cursor
;
if
((
m_limit
-
m_cursor
)
<
3
)
if
((
m_limit
-
m_cursor
)
<
3
)
{
{
yyfill
();
yyfill
();
// LCOV_EXCL_LINE;
}
;
}
yych
=
*
m_cursor
;
yych
=
*
m_cursor
;
if
(
yych
<=
'D'
)
if
(
yych
<=
'D'
)
{
{
...
...
src/json.hpp.re2c
View file @
1f381d49
...
@@ -3629,7 +3629,7 @@ class basic_json
...
@@ -3629,7 +3629,7 @@ class basic_json
re2c:define:YYCURSOR = m_cursor;
re2c:define:YYCURSOR = m_cursor;
re2c:define:YYLIMIT = m_limit;
re2c:define:YYLIMIT = m_limit;
re2c:define:YYMARKER = m_marker;
re2c:define:YYMARKER = m_marker;
re2c:define:YYFILL = "
{ yyfill(); }
";
re2c:define:YYFILL = "
yyfill(); // LCOV_EXCL_LINE
";
re2c:yyfill:parameter = 0;
re2c:yyfill:parameter = 0;
re2c:indent:string = " ";
re2c:indent:string = " ";
re2c:indent:top = 1;
re2c:indent:top = 1;
...
...
test/unit.cpp
View file @
1f381d49
...
@@ -7405,21 +7405,6 @@ TEST_CASE("parser class")
...
@@ -7405,21 +7405,6 @@ TEST_CASE("parser class")
// horizontal tab
// horizontal tab
CHECK
(
json
::
parser
(
"
\"\\
t
\"
"
).
parse
()
==
json
(
"
\t
"
));
CHECK
(
json
::
parser
(
"
\"\\
t
\"
"
).
parse
()
==
json
(
"
\t
"
));
// exotic test cases for full coverage
{
// that one got illegal
//{
// std::stringstream ss;
// ss << "\"\\u000\n1\"";
// CHECK(json::parser(ss).parse().get<json::string_t>() == "\x01");
//}
//{
// std::stringstream ss;
// ss << "\"\\u00\n01\"";
// CHECK(json::parser(ss).parse().get<json::string_t>() == "\x01");
//}
}
CHECK
(
json
::
parser
(
"
\"\\
u0001
\"
"
).
parse
().
get
<
json
::
string_t
>
()
==
"
\x01
"
);
CHECK
(
json
::
parser
(
"
\"\\
u0001
\"
"
).
parse
().
get
<
json
::
string_t
>
()
==
"
\x01
"
);
CHECK
(
json
::
parser
(
"
\"\\
u000a
\"
"
).
parse
().
get
<
json
::
string_t
>
()
==
"
\n
"
);
CHECK
(
json
::
parser
(
"
\"\\
u000a
\"
"
).
parse
().
get
<
json
::
string_t
>
()
==
"
\n
"
);
CHECK
(
json
::
parser
(
"
\"\\
u00b0
\"
"
).
parse
().
get
<
json
::
string_t
>
()
==
"°"
);
CHECK
(
json
::
parser
(
"
\"\\
u00b0
\"
"
).
parse
().
get
<
json
::
string_t
>
()
==
"°"
);
...
...
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