From 9ae6796a380ebb00e8f494d1ecd4101be5c6345e Mon Sep 17 00:00:00 2001
From: Niels Lohmann <mail@nlohmann.me>
Date: Sat, 9 Sep 2017 13:07:10 +0200
Subject: [PATCH] :white_check_mark: improved test coverage

---
 test/src/unit-class_parser.cpp | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/test/src/unit-class_parser.cpp b/test/src/unit-class_parser.cpp
index f375d851..e873ef96 100644
--- a/test/src/unit-class_parser.cpp
+++ b/test/src/unit-class_parser.cpp
@@ -721,29 +721,43 @@ TEST_CASE("parser class")
         CHECK_THROWS_AS(parser_helper("n"), json::parse_error&);
         CHECK_THROWS_AS(parser_helper("nu"), json::parse_error&);
         CHECK_THROWS_AS(parser_helper("nul"), json::parse_error&);
+        CHECK_THROWS_AS(parser_helper("nulk"), json::parse_error&);
+        CHECK_THROWS_AS(parser_helper("nulm"), json::parse_error&);
         CHECK_THROWS_WITH(parser_helper("n"),
                           "[json.exception.parse_error.101] parse error at 2: syntax error - invalid literal; last read: 'n'");
         CHECK_THROWS_WITH(parser_helper("nu"),
                           "[json.exception.parse_error.101] parse error at 3: syntax error - invalid literal; last read: 'nu'");
         CHECK_THROWS_WITH(parser_helper("nul"),
                           "[json.exception.parse_error.101] parse error at 4: syntax error - invalid literal; last read: 'nul'");
+        CHECK_THROWS_WITH(parser_helper("nulk"),
+                          "[json.exception.parse_error.101] parse error at 4: syntax error - invalid literal; last read: 'nulk'");
+        CHECK_THROWS_WITH(parser_helper("nulm"),
+                          "[json.exception.parse_error.101] parse error at 4: syntax error - invalid literal; last read: 'nulm'");
 
         // unexpected end of true
         CHECK_THROWS_AS(parser_helper("t"), json::parse_error&);
         CHECK_THROWS_AS(parser_helper("tr"), json::parse_error&);
         CHECK_THROWS_AS(parser_helper("tru"), json::parse_error&);
+        CHECK_THROWS_AS(parser_helper("trud"), json::parse_error&);
+        CHECK_THROWS_AS(parser_helper("truf"), json::parse_error&);
         CHECK_THROWS_WITH(parser_helper("t"),
                           "[json.exception.parse_error.101] parse error at 2: syntax error - invalid literal; last read: 't'");
         CHECK_THROWS_WITH(parser_helper("tr"),
                           "[json.exception.parse_error.101] parse error at 3: syntax error - invalid literal; last read: 'tr'");
         CHECK_THROWS_WITH(parser_helper("tru"),
                           "[json.exception.parse_error.101] parse error at 4: syntax error - invalid literal; last read: 'tru'");
+        CHECK_THROWS_WITH(parser_helper("trud"),
+                          "[json.exception.parse_error.101] parse error at 4: syntax error - invalid literal; last read: 'trud'");
+        CHECK_THROWS_WITH(parser_helper("truf"),
+                          "[json.exception.parse_error.101] parse error at 4: syntax error - invalid literal; last read: 'truf'");
 
         // unexpected end of false
         CHECK_THROWS_AS(parser_helper("f"), json::parse_error&);
         CHECK_THROWS_AS(parser_helper("fa"), json::parse_error&);
         CHECK_THROWS_AS(parser_helper("fal"), json::parse_error&);
         CHECK_THROWS_AS(parser_helper("fals"), json::parse_error&);
+        CHECK_THROWS_AS(parser_helper("falsd"), json::parse_error&);
+        CHECK_THROWS_AS(parser_helper("falsf"), json::parse_error&);
         CHECK_THROWS_WITH(parser_helper("f"),
                           "[json.exception.parse_error.101] parse error at 2: syntax error - invalid literal; last read: 'f'");
         CHECK_THROWS_WITH(parser_helper("fa"),
@@ -752,6 +766,10 @@ TEST_CASE("parser class")
                           "[json.exception.parse_error.101] parse error at 4: syntax error - invalid literal; last read: 'fal'");
         CHECK_THROWS_WITH(parser_helper("fals"),
                           "[json.exception.parse_error.101] parse error at 5: syntax error - invalid literal; last read: 'fals'");
+        CHECK_THROWS_WITH(parser_helper("falsd"),
+                          "[json.exception.parse_error.101] parse error at 5: syntax error - invalid literal; last read: 'falsd'");
+        CHECK_THROWS_WITH(parser_helper("falsf"),
+                          "[json.exception.parse_error.101] parse error at 5: syntax error - invalid literal; last read: 'falsf'");
 
         // missing/unexpected end of array
         CHECK_THROWS_AS(parser_helper("["), json::parse_error&);