Merge pull request #2223 from ethereum/julia-bool

Add support for bool literals in Julia
This commit is contained in:
chriseth
2017-05-19 17:48:36 +02:00
committed by GitHub
7 changed files with 63 additions and 6 deletions
+6
View File
@@ -120,6 +120,12 @@ BOOST_AUTO_TEST_CASE(vardecl)
BOOST_CHECK(successParse("{ let x:u256 := 7:u256 }"));
}
BOOST_AUTO_TEST_CASE(vardecl_bool)
{
BOOST_CHECK(successParse("{ let x:bool := true:bool }"));
BOOST_CHECK(successParse("{ let x:bool := false:bool }"));
}
BOOST_AUTO_TEST_CASE(assignment)
{
BOOST_CHECK(successParse("{ let x:u256 := 2:u256 let y:u256 := x }"));
+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 }"));