mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Updated 'Semantic predicate test'
This commit is contained in:
parent
10cc75d503
commit
3c58f26635
@ -626,6 +626,11 @@ TEST_CASE("Semantic predicate test", "[predicate]")
|
|||||||
REQUIRE(parser.parse("100", val));
|
REQUIRE(parser.parse("100", val));
|
||||||
REQUIRE(val == 100);
|
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));
|
REQUIRE(!parser.parse("200", val));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user