]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4088fd] Added more new unit tests
authorFrancis Dupont <fdupont@isc.org>
Mon, 9 Nov 2015 12:19:14 +0000 (13:19 +0100)
committerFrancis Dupont <fdupont@isc.org>
Mon, 9 Nov 2015 12:19:14 +0000 (13:19 +0100)
src/lib/eval/tests/context_unittest.cc

index 8cb6f6d31bdfc3038dcdd43cc051b8e6ec53327e..15a3cb37737f30cba92a7dfded22875a59584b2e 100644 (file)
@@ -259,7 +259,10 @@ TEST_F(EvalContextTest, scanParseErrors) {
     checkError("untyped:",
                "<string>:1.9: syntax error, unexpected end of file");
     checkError("0x", "<string>:1.1: syntax error, unexpected option code");
+    checkError("0abc",
+               "<string>:1.1: syntax error, unexpected option code");
     checkError("===", "<string>:1.1-2: syntax error, unexpected ==");
+    checkError("option[123] < 'foo'", "<string>:1.13: Invalid character: <");
 }
 
 // Tests some parser error cases
@@ -270,10 +273,6 @@ TEST_F(EvalContextTest, parseErrors) {
     checkError("'foo''bar'",
                "<string>:1.6-10: syntax error, unexpected constant string, "
                "expecting ==");
-    checkError("0x",
-               "<string>:1.1: syntax error, unexpected option code");
-    checkError("0abc",
-               "<string>:1.1: syntax error, unexpected option code");
     checkError("== 'ab'", "<string>:1.1-2: syntax error, unexpected ==");
     checkError("'foo' ==",
                "<string>:1.9: syntax error, unexpected end of file");