aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index 4cf4fa7f..019b0e4e 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -7426,15 +7426,19 @@ BOOST_AUTO_TEST_CASE(inline_assembly_storage_access)
uint16 x;
uint16 public y;
uint public z;
- function f() {
- // we know that z is aligned because it is too large, so we just discard its
- // intra-slot offset value
- assembly { 7 z pop sstore }
+ function f() returns (bool) {
+ uint off;
+ assembly {
+ sstore(z$slot, 7)
+ off := z$offset
+ }
+ assert(off == 0);
+ return true;
}
}
)";
compileAndRun(sourceCode, 0, "C");
- BOOST_CHECK(callContractFunction("f()") == encodeArgs());
+ BOOST_CHECK(callContractFunction("f()") == encodeArgs(true));
BOOST_CHECK(callContractFunction("z()") == encodeArgs(u256(7)));
}