mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Added a unit test
This commit is contained in:
parent
dc18c3d017
commit
604fe1808e
@ -1027,3 +1027,17 @@ TEST(GeneralTest, DisableEndOfInputCheckTest) {
|
||||
EXPECT_TRUE(ret);
|
||||
}
|
||||
|
||||
TEST(GeneralTest, InvalidCutOperator) {
|
||||
auto parser = peg::parser(R"(
|
||||
S <- 'a' ↑ 'b'
|
||||
)");
|
||||
|
||||
auto ret = parser.parse("ab");
|
||||
EXPECT_TRUE(ret);
|
||||
|
||||
ret = parser.parse("ac");
|
||||
EXPECT_FALSE(ret);
|
||||
|
||||
ret = parser.parse("b");
|
||||
EXPECT_FALSE(ret);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user