From 5ef445f64f0e7854dcf9ac89b7867570bbbbbe69 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Mon, 1 Jun 2015 22:00:27 +0200 Subject: [PATCH] test Conflicts: test/libsolidity/SolidityEndToEndTest.cpp --- libsolidity/SolidityEndToEndTest.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libsolidity/SolidityEndToEndTest.cpp b/libsolidity/SolidityEndToEndTest.cpp index 9f6f27d7d..e7287b399 100644 --- a/libsolidity/SolidityEndToEndTest.cpp +++ b/libsolidity/SolidityEndToEndTest.cpp @@ -4172,6 +4172,17 @@ BOOST_AUTO_TEST_CASE(evm_exceptions_in_constructor_out_of_baund) BOOST_CHECK(compileAndRunWthoutCheck(sourceCode, 0, "A").empty()); } +BOOST_AUTO_TEST_CASE(positive_integers_to_signed) +{ + char const* sourceCode = R"( + contract test { + int8 public x = 2; + } + )"; + compileAndRun(sourceCode, 0, "test"); + BOOST_CHECK(callContractFunction("x()") == encodeArgs(2)); +} + BOOST_AUTO_TEST_SUITE_END() }