🐛 fix lexer to properly cope with repeated comments #2330

This commit is contained in:
Niels Lohmann
2020-07-31 18:59:22 +02:00
parent 1da931730a
commit 3888b1642a
4 changed files with 12 additions and 2 deletions

View File

@@ -241,5 +241,8 @@ TEST_CASE("lexer class")
CHECK((scan_string("/* true */", true) == json::lexer::token_type::end_of_input));
CHECK((scan_string("/*/**/", true) == json::lexer::token_type::end_of_input));
CHECK((scan_string("/*/* */", true) == json::lexer::token_type::end_of_input));
CHECK((scan_string("//\n//\n", true) == json::lexer::token_type::end_of_input));
CHECK((scan_string("/**//**//**/", true) == json::lexer::token_type::end_of_input));
}
}