aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-07-27 19:40:25 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-08-02 20:37:22 +0800
commit43c01361f3bb1b2ffebbb82bb24ec7fecbb52d16 (patch)
tree20d7fcbf42a468e388f48d283561ecaa74b11bd3 /test
parenta4ab305347c296e44e911765e4cd8c3243287e23 (diff)
downloaddexon-solidity-43c01361f3bb1b2ffebbb82bb24ec7fecbb52d16.tar
dexon-solidity-43c01361f3bb1b2ffebbb82bb24ec7fecbb52d16.tar.gz
dexon-solidity-43c01361f3bb1b2ffebbb82bb24ec7fecbb52d16.tar.bz2
dexon-solidity-43c01361f3bb1b2ffebbb82bb24ec7fecbb52d16.tar.lz
dexon-solidity-43c01361f3bb1b2ffebbb82bb24ec7fecbb52d16.tar.xz
dexon-solidity-43c01361f3bb1b2ffebbb82bb24ec7fecbb52d16.tar.zst
dexon-solidity-43c01361f3bb1b2ffebbb82bb24ec7fecbb52d16.zip
Drops tests for inline assembly jumps and function access as both isn't possible anymore.
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index d8b4b05d..45a56b22 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -8910,52 +8910,6 @@ BOOST_AUTO_TEST_CASE(inline_assembly_storage_access_via_pointer)
ABI_CHECK(callContractFunction("separator2()"), encodeArgs(u256(0)));
}
-BOOST_AUTO_TEST_CASE(inline_assembly_jumps)
-{
- char const* sourceCode = R"(
- contract C {
- function f() public {
- assembly {
- let n := calldataload(4)
- let a := 1
- let b := a
- loop:
- jumpi(loopend, eq(n, 0))
- a add swap1
- n := sub(n, 1)
- jump(loop)
- loopend:
- mstore(0, a)
- return(0, 0x20)
- }
- }
- }
- )";
- compileAndRun(sourceCode, 0, "C");
- ABI_CHECK(callContractFunction("f()", u256(5)), encodeArgs(u256(13)));
- ABI_CHECK(callContractFunction("f()", u256(7)), encodeArgs(u256(34)));
-}
-
-BOOST_AUTO_TEST_CASE(inline_assembly_function_access)
-{
- char const* sourceCode = R"(
- contract C {
- uint public x;
- function g(uint y) public { x = 2 * y; assembly { stop } }
- function f(uint _x) public {
- assembly {
- _x
- jump(g)
- pop
- }
- }
- }
- )";
- compileAndRun(sourceCode, 0, "C");
- ABI_CHECK(callContractFunction("f(uint256)", u256(5)), encodeArgs());
- ABI_CHECK(callContractFunction("x()"), encodeArgs(u256(10)));
-}
-
BOOST_AUTO_TEST_CASE(inline_assembly_function_call)
{
char const* sourceCode = R"(