Expect end of string at end of top-level block for assembly parser.

This commit is contained in:
chriseth
2018-02-21 00:41:39 +01:00
parent f5f00b4ee9
commit e2bf5de8a2
9 changed files with 18 additions and 8 deletions
+5
View File
@@ -168,6 +168,11 @@ BOOST_AUTO_TEST_CASE(smoke_test)
BOOST_CHECK(successParse("{ }"));
}
BOOST_AUTO_TEST_CASE(surplus_input)
{
CHECK_PARSE_ERROR("{ } { }", ParserError, "Expected token EOS");
}
BOOST_AUTO_TEST_CASE(simple_instructions)
{
BOOST_CHECK(successParse("{ dup1 dup1 mul dup1 sub pop }"));