Commit 034244a2 authored by Niels's avatar Niels

Merge branch 'feature/coverage' into develop

parents aa7f5ad8 1e896eb9
......@@ -7734,7 +7734,7 @@ class basic_json
};
if ((m_limit - m_cursor) < 5)
{
yyfill(); // LCOV_EXCL_LINE;
yyfill();
}
yych = *m_cursor;
if (yybm[0 + yych] & 32)
......@@ -7868,7 +7868,7 @@ basic_json_parser_6:
++m_cursor;
if (m_limit <= m_cursor)
{
yyfill(); // LCOV_EXCL_LINE;
yyfill();
}
yych = *m_cursor;
if (yybm[0 + yych] & 32)
......@@ -7938,7 +7938,7 @@ basic_json_parser_15:
m_marker = ++m_cursor;
if ((m_limit - m_cursor) < 3)
{
yyfill(); // LCOV_EXCL_LINE;
yyfill();
}
yych = *m_cursor;
if (yybm[0 + yych] & 64)
......@@ -8031,7 +8031,7 @@ basic_json_parser_31:
++m_cursor;
if (m_limit <= m_cursor)
{
yyfill(); // LCOV_EXCL_LINE;
yyfill();
}
yych = *m_cursor;
basic_json_parser_32:
......@@ -8068,7 +8068,7 @@ basic_json_parser_36:
++m_cursor;
if (m_limit <= m_cursor)
{
yyfill(); // LCOV_EXCL_LINE;
yyfill();
}
yych = *m_cursor;
if (yych <= 'e')
......@@ -8212,7 +8212,7 @@ basic_json_parser_43:
++m_cursor;
if (m_limit <= m_cursor)
{
yyfill(); // LCOV_EXCL_LINE;
yyfill();
}
yych = *m_cursor;
if (yych <= '@')
......@@ -8248,7 +8248,7 @@ basic_json_parser_44:
m_marker = ++m_cursor;
if ((m_limit - m_cursor) < 3)
{
yyfill(); // LCOV_EXCL_LINE;
yyfill();
}
yych = *m_cursor;
if (yych <= 'D')
......@@ -8289,7 +8289,7 @@ basic_json_parser_47:
++m_cursor;
if (m_limit <= m_cursor)
{
yyfill(); // LCOV_EXCL_LINE;
yyfill();
}
yych = *m_cursor;
if (yych <= '/')
......@@ -8331,7 +8331,7 @@ basic_json_parser_54:
++m_cursor;
if (m_limit <= m_cursor)
{
yyfill(); // LCOV_EXCL_LINE;
yyfill();
}
yych = *m_cursor;
if (yych <= '@')
......@@ -8385,7 +8385,7 @@ basic_json_parser_60:
++m_cursor;
if (m_limit <= m_cursor)
{
yyfill(); // LCOV_EXCL_LINE;
yyfill();
}
yych = *m_cursor;
if (yych <= '@')
......@@ -8426,7 +8426,7 @@ basic_json_parser_63:
++m_cursor;
if (m_limit <= m_cursor)
{
yyfill(); // LCOV_EXCL_LINE;
yyfill();
}
yych = *m_cursor;
if (yych <= '@')
......
......@@ -7698,7 +7698,7 @@ class basic_json
re2c:define:YYCURSOR = m_cursor;
re2c:define:YYLIMIT = m_limit;
re2c:define:YYMARKER = m_marker;
re2c:define:YYFILL = "yyfill(); // LCOV_EXCL_LINE";
re2c:define:YYFILL = "yyfill()";
re2c:yyfill:parameter = 0;
re2c:indent:string = " ";
re2c:indent:top = 1;
......
......@@ -445,6 +445,10 @@ TEST_CASE("parser class")
CHECK_THROWS_AS(json::parser("\"\\u0\"").parse(), std::invalid_argument);
CHECK_THROWS_AS(json::parser("\"\\u01\"").parse(), std::invalid_argument);
CHECK_THROWS_AS(json::parser("\"\\u012\"").parse(), std::invalid_argument);
CHECK_THROWS_AS(json::parser("\"\\u").parse(), std::invalid_argument);
CHECK_THROWS_AS(json::parser("\"\\u0").parse(), std::invalid_argument);
CHECK_THROWS_AS(json::parser("\"\\u01").parse(), std::invalid_argument);
CHECK_THROWS_AS(json::parser("\"\\u012").parse(), std::invalid_argument);
CHECK_THROWS_WITH(json::parser("\"").parse(),
"parse error - unexpected '\"'");
CHECK_THROWS_WITH(json::parser("\"\\\"").parse(),
......@@ -457,6 +461,14 @@ TEST_CASE("parser class")
"parse error - unexpected '\"'");
CHECK_THROWS_WITH(json::parser("\"\\u012\"").parse(),
"parse error - unexpected '\"'");
CHECK_THROWS_WITH(json::parser("\"\\u").parse(),
"parse error - unexpected '\"'");
CHECK_THROWS_WITH(json::parser("\"\\u0").parse(),
"parse error - unexpected '\"'");
CHECK_THROWS_WITH(json::parser("\"\\u01").parse(),
"parse error - unexpected '\"'");
CHECK_THROWS_WITH(json::parser("\"\\u012").parse(),
"parse error - unexpected '\"'");
// invalid escapes
for (int c = 1; c < 128; ++c)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment