From 7c051f1e321a406c1a57870f75106151ad70047b Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 4 Jul 2017 22:53:05 +0200 Subject: LLL: implement WITH keyword --- test/liblll/EndToEndTest.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test') diff --git a/test/liblll/EndToEndTest.cpp b/test/liblll/EndToEndTest.cpp index 60aef7b0..aad89b91 100644 --- a/test/liblll/EndToEndTest.cpp +++ b/test/liblll/EndToEndTest.cpp @@ -109,6 +109,19 @@ BOOST_AUTO_TEST_CASE(variables) BOOST_CHECK(callFallback() == encodeArgs(u256(488))); } +BOOST_AUTO_TEST_CASE(with) +{ + char const* sourceCode = R"( + (returnlll + (seq + (set 'x 11) + (with 'y 22 { [0]:(+ (get 'x) (get 'y)) }) + (return 0 32))) + )"; + compileAndRun(sourceCode); + BOOST_CHECK(callFallback() == toBigEndian(u256(33))); +} + BOOST_AUTO_TEST_CASE(when) { char const* sourceCode = R"( -- cgit v1.2.3