diff options
author | chriseth <chris@ethereum.org> | 2018-01-04 21:24:45 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-04-12 19:09:38 +0800 |
commit | 167ee2fcbb1000e6387142892c4252f8597a4481 (patch) | |
tree | 89fdc3d02f88551361ec1d49ea2cf3c62a323211 /test | |
parent | 43b1dd758b3f3194907fad4be1c35bbc374cdd71 (diff) | |
download | dexon-solidity-167ee2fcbb1000e6387142892c4252f8597a4481.tar.gz dexon-solidity-167ee2fcbb1000e6387142892c4252f8597a4481.tar.zst dexon-solidity-167ee2fcbb1000e6387142892c4252f8597a4481.zip |
Update source location tests.
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/Assembly.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/test/libsolidity/Assembly.cpp b/test/libsolidity/Assembly.cpp index 5519ae0d..59993f66 100644 --- a/test/libsolidity/Assembly.cpp +++ b/test/libsolidity/Assembly.cpp @@ -158,13 +158,24 @@ BOOST_AUTO_TEST_CASE(location_test) } )"; shared_ptr<string const> n = make_shared<string>(""); + shared_ptr<string const> codegen = make_shared<string>("--CODEGEN--:8-17"); 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); } |