From 3c58f266351cd3f592d8431dff9e9e1526fa73f4 Mon Sep 17 00:00:00 2001 From: yhirose Date: Wed, 20 May 2020 14:08:32 -0400 Subject: [PATCH] Updated 'Semantic predicate test' --- test/test2.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test2.cc b/test/test2.cc index 6ca38c4..c6073aa 100644 --- a/test/test2.cc +++ b/test/test2.cc @@ -626,6 +626,11 @@ TEST_CASE("Semantic predicate test", "[predicate]") REQUIRE(parser.parse("100", val)); REQUIRE(val == 100); + parser.log = [](size_t line, size_t col, const std::string& msg) { + REQUIRE(line == 1); + REQUIRE(col == 1); + REQUIRE(msg == "value error!!"); + }; REQUIRE(!parser.parse("200", val)); }