aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-07-27 19:40:07 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-08-02 20:37:22 +0800
commita4ab305347c296e44e911765e4cd8c3243287e23 (patch)
treed6908ee14473048ecc1b4a1e02373cbce322ef4d /test
parent9b8a05ebfb34b0c4062cc6ab824b7281066424a6 (diff)
downloaddexon-solidity-a4ab305347c296e44e911765e4cd8c3243287e23.tar
dexon-solidity-a4ab305347c296e44e911765e4cd8c3243287e23.tar.gz
dexon-solidity-a4ab305347c296e44e911765e4cd8c3243287e23.tar.bz2
dexon-solidity-a4ab305347c296e44e911765e4cd8c3243287e23.tar.lz
dexon-solidity-a4ab305347c296e44e911765e4cd8c3243287e23.tar.xz
dexon-solidity-a4ab305347c296e44e911765e4cd8c3243287e23.tar.zst
dexon-solidity-a4ab305347c296e44e911765e4cd8c3243287e23.zip
Drop swap_peephole_optimization test from EndToEndTests
Already covered by libevmasm/Optimiser: peephole_noncommutative_swap1, peephole_commutative_swap1 and peephole_swap_comparison
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index 0437c72f..d8b4b05d 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -12538,50 +12538,6 @@ BOOST_AUTO_TEST_CASE(staticcall_for_view_and_pure)
}
}
-BOOST_AUTO_TEST_CASE(swap_peephole_optimisation)
-{
- char const* sourceCode = R"(
- contract C {
- function lt(uint a, uint b) public returns (bool c) {
- assembly {
- a
- b
- swap1
- lt
- =: c
- }
- }
- function add(uint a, uint b) public returns (uint c) {
- assembly {
- a
- b
- swap1
- add
- =: c
- }
- }
- function div(uint a, uint b) public returns (uint c) {
- assembly {
- a
- b
- swap1
- div
- =: c
- }
- }
- }
- )";
- compileAndRun(sourceCode);
- BOOST_CHECK(callContractFunction("lt(uint256,uint256)", u256(1), u256(2)) == encodeArgs(u256(1)));
- BOOST_CHECK(callContractFunction("lt(uint256,uint256)", u256(2), u256(1)) == encodeArgs(u256(0)));
- BOOST_CHECK(callContractFunction("add(uint256,uint256)", u256(1), u256(2)) == encodeArgs(u256(3)));
- BOOST_CHECK(callContractFunction("add(uint256,uint256)", u256(100), u256(200)) == encodeArgs(u256(300)));
- BOOST_CHECK(callContractFunction("div(uint256,uint256)", u256(2), u256(1)) == encodeArgs(u256(2)));
- BOOST_CHECK(callContractFunction("div(uint256,uint256)", u256(200), u256(10)) == encodeArgs(u256(20)));
- BOOST_CHECK(callContractFunction("div(uint256,uint256)", u256(1), u256(0)) == encodeArgs(u256(0)));
- BOOST_CHECK(callContractFunction("div(uint256,uint256)", u256(0), u256(1)) == encodeArgs(u256(0)));
-}
-
BOOST_AUTO_TEST_CASE(bitwise_shifting_constantinople)
{
if (!dev::test::Options::get().evmVersion().hasBitwiseShifting())