aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-05-02 22:50:15 +0800
committerGitHub <noreply@github.com>2018-05-02 22:50:15 +0800
commita856135bbf709d17732ce610e086c2300783b0a9 (patch)
treec52cc5f5c2b7f263b18ac78ef3cc3760155a4726 /test
parentde2c8fd684dd7c2a29460f64ffc891f1d6353cc8 (diff)
parent971941b3f6402665662d85eb9b31060f0ae230fb (diff)
downloaddexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.tar
dexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.tar.gz
dexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.tar.bz2
dexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.tar.lz
dexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.tar.xz
dexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.tar.zst
dexon-solidity-a856135bbf709d17732ce610e086c2300783b0a9.zip
Merge pull request #3797 from ethereum/shift-constantinople
Use native shift instructions on Constantinople
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/Assembly.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/libsolidity/Assembly.cpp b/test/libsolidity/Assembly.cpp
index 77ca363a..7b3df043 100644
--- a/test/libsolidity/Assembly.cpp
+++ b/test/libsolidity/Assembly.cpp
@@ -158,8 +158,9 @@ BOOST_AUTO_TEST_CASE(location_test)
}
)";
AssemblyItems items = compileContract(sourceCode);
+ bool hasShifts = dev::test::Options::get().evmVersion().hasBitwiseShifting();
vector<SourceLocation> locations =
- vector<SourceLocation>(24, SourceLocation(2, 75, make_shared<string>(""))) +
+ vector<SourceLocation>(hasShifts ? 23 : 24, SourceLocation(2, 75, make_shared<string>(""))) +
vector<SourceLocation>(2, SourceLocation(20, 72, make_shared<string>(""))) +
vector<SourceLocation>(1, SourceLocation(8, 17, make_shared<string>("--CODEGEN--"))) +
vector<SourceLocation>(3, SourceLocation(5, 7, make_shared<string>("--CODEGEN--"))) +
@@ -172,8 +173,6 @@ BOOST_AUTO_TEST_CASE(location_test)
vector<SourceLocation>(1, SourceLocation(65, 67, make_shared<string>(""))) +
vector<SourceLocation>(2, SourceLocation(58, 67, make_shared<string>(""))) +
vector<SourceLocation>(2, SourceLocation(20, 72, make_shared<string>("")));
-
-
checkAssemblyLocations(items, locations);
}