json: update expected error in unit test
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 22 Aug 2017 19:50:34 +0000 (15:50 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 31 Aug 2017 14:16:36 +0000 (10:16 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/json/static.nit

index 09d463d..0d25f10 100644 (file)
@@ -116,11 +116,11 @@ redef class Text
        #     assert str isa String
        #     assert str == "foo, bar, baz"
        #
-       # Example of a syntaxic error:
+       # Example of a syntax error:
        #
-       #     var bad = "\{foo: \"bar\"\}".parse_json
-       #     assert bad isa JsonParseError
-       #     assert bad.position.col_start == 2
+       #     var error = "\{foo: \"bar\"\}".parse_json
+       #     assert error isa JsonParseError
+       #     assert error.to_s == "Bad key format Error: bad JSON entity"
        fun parse_json: nullable Serializable do return (new JSONStringParser(self.to_s)).parse_entity
 end