aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/Assembly.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-04-13 03:01:08 +0800
committerGitHub <noreply@github.com>2018-04-13 03:01:08 +0800
commit7054defdd6c202d0943c11cb87ac2748b9bdc62b (patch)
tree8a69eb34b9089b689d5f467b8cb56b4a74ad04b8 /test/libsolidity/Assembly.cpp
parent44416d1ac65b2cfae4bb15d39bc84b1a78211baa (diff)
parent966367305ad511900bedfd9af08114a0b1307399 (diff)
downloaddexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar
dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.gz
dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.bz2
dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.lz
dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.xz
dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.tar.zst
dexon-solidity-7054defdd6c202d0943c11cb87ac2748b9bdc62b.zip
Merge pull request #3364 from ethereum/revertWithReason
Revert with reason
Diffstat (limited to 'test/libsolidity/Assembly.cpp')
-rw-r--r--test/libsolidity/Assembly.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/test/libsolidity/Assembly.cpp b/test/libsolidity/Assembly.cpp
index 5519ae0d..77ca363a 100644
--- a/test/libsolidity/Assembly.cpp
+++ b/test/libsolidity/Assembly.cpp
@@ -157,14 +157,23 @@ BOOST_AUTO_TEST_CASE(location_test)
}
}
)";
- shared_ptr<string const> n = make_shared<string>("");
AssemblyItems items = compileContract(sourceCode);
vector<SourceLocation> locations =
- vector<SourceLocation>(24, SourceLocation(2, 75, n)) +
- vector<SourceLocation>(32, SourceLocation(20, 72, n)) +
- vector<SourceLocation>{SourceLocation(42, 51, n), SourceLocation(65, 67, n)} +
- vector<SourceLocation>(2, SourceLocation(58, 67, n)) +
- vector<SourceLocation>(2, SourceLocation(20, 72, n));
+ vector<SourceLocation>(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--"))) +
+ vector<SourceLocation>(1, SourceLocation(30, 31, make_shared<string>("--CODEGEN--"))) +
+ vector<SourceLocation>(1, SourceLocation(27, 28, make_shared<string>("--CODEGEN--"))) +
+ vector<SourceLocation>(1, SourceLocation(20, 32, make_shared<string>("--CODEGEN--"))) +
+ vector<SourceLocation>(1, SourceLocation(5, 7, make_shared<string>("--CODEGEN--"))) +
+ vector<SourceLocation>(24, SourceLocation(20, 72, make_shared<string>(""))) +
+ vector<SourceLocation>(1, SourceLocation(42, 51, make_shared<string>(""))) +
+ 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);
}