aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-04-17 22:24:23 +0800
committerchriseth <c@ethdev.com>2015-04-17 22:24:23 +0800
commit6b08b99b5ef319837f9293cca6fd74803fe4688d (patch)
treefe3e39ec2f14e1c52137c9734da36766ba57ba53 /SolidityEndToEndTest.cpp
parent6753e0a8e6796e99ee826c28c7bcbde55348b07d (diff)
parent7571971ca05fd12e3603531044e094ffc0000fb2 (diff)
downloaddexon-solidity-6b08b99b5ef319837f9293cca6fd74803fe4688d.tar
dexon-solidity-6b08b99b5ef319837f9293cca6fd74803fe4688d.tar.gz
dexon-solidity-6b08b99b5ef319837f9293cca6fd74803fe4688d.tar.bz2
dexon-solidity-6b08b99b5ef319837f9293cca6fd74803fe4688d.tar.lz
dexon-solidity-6b08b99b5ef319837f9293cca6fd74803fe4688d.tar.xz
dexon-solidity-6b08b99b5ef319837f9293cca6fd74803fe4688d.tar.zst
dexon-solidity-6b08b99b5ef319837f9293cca6fd74803fe4688d.zip
Merge remote-tracking branch 'ethereum/develop' into sol_overloadingFunctions
Diffstat (limited to 'SolidityEndToEndTest.cpp')
-rw-r--r--SolidityEndToEndTest.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp
index 65be0224..5dd0cb37 100644
--- a/SolidityEndToEndTest.cpp
+++ b/SolidityEndToEndTest.cpp
@@ -3743,6 +3743,29 @@ BOOST_AUTO_TEST_CASE(super_overload)
BOOST_CHECK(callContractFunction("h()") == encodeArgs(2));
}
+BOOST_AUTO_TEST_CASE(packed_storage_signed)
+{
+ char const* sourceCode = R"(
+ contract C {
+ int8 a;
+ uint8 b;
+ int8 c;
+ uint8 d;
+ function test() returns (uint x1, uint x2, uint x3, uint x4) {
+ a = -2;
+ b = -uint8(a) * 2;
+ c = a * int8(120) * int8(121);
+ x1 = uint(a);
+ x2 = b;
+ x3 = uint(c);
+ x4 = d;
+ }
+ }
+ )";
+ compileAndRun(sourceCode);
+ BOOST_CHECK( callContractFunction("test()") == encodeArgs(u256(-2), u256(4), u256(-112), u256(0)));
+}
+
BOOST_AUTO_TEST_SUITE_END()
}