Add tests for bool literal

This commit is contained in:
Alex Beregszaszi
2017-05-19 09:44:16 +01:00
parent edd0afa3c3
commit 2ade4fcdd8
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -161,6 +161,12 @@ BOOST_AUTO_TEST_CASE(vardecl)
BOOST_CHECK(successParse("{ let x := 7 }"));
}
BOOST_AUTO_TEST_CASE(vardecl_bool)
{
CHECK_PARSE_ERROR("{ let x := true }", ParserError, "True and false are not valid literals.");
CHECK_PARSE_ERROR("{ let x := false }", ParserError, "True and false are not valid literals.");
}
BOOST_AUTO_TEST_CASE(assignment)
{
BOOST_CHECK(successParse("{ let x := 2 7 8 add =: x }"));