diff options
author | chriseth <c@ethdev.com> | 2016-11-21 18:42:38 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-11-21 18:42:38 +0800 |
commit | b318366e6f16ed6a4274247d09badac4affff8d5 (patch) | |
tree | ef8dac7fe9285c1bc0b24ad042a3cda5565a661d /test/libsolidity/Assembly.cpp | |
parent | 4633f3def897db0f91237f98cf46e5d84fb05e61 (diff) | |
parent | 5ebd31ce2d7447917740088eaa22c8c62c453a94 (diff) | |
download | dexon-solidity-b318366e6f16ed6a4274247d09badac4affff8d5.tar.gz dexon-solidity-b318366e6f16ed6a4274247d09badac4affff8d5.tar.zst dexon-solidity-b318366e6f16ed6a4274247d09badac4affff8d5.zip |
Merge remote-tracking branch 'origin/develop' into release
Diffstat (limited to 'test/libsolidity/Assembly.cpp')
-rw-r--r-- | test/libsolidity/Assembly.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/libsolidity/Assembly.cpp b/test/libsolidity/Assembly.cpp index 8d7a3540..e5ce691b 100644 --- a/test/libsolidity/Assembly.cpp +++ b/test/libsolidity/Assembly.cpp @@ -91,8 +91,10 @@ void checkAssemblyLocations(AssemblyItems const& _items, vector<SourceLocation> BOOST_CHECK_MESSAGE( _items[i].location() == _locations[i], "Location mismatch for assembly item " + to_string(i) + ". Found: " + + (_items[i].location().sourceName ? *_items[i].location().sourceName + ":" : "(null source name)") + to_string(_items[i].location().start) + "-" + to_string(_items[i].location().end) + ", expected: " + + (_locations[i].sourceName ? *_locations[i].sourceName + ":" : "(null source name)") + to_string(_locations[i].start) + "-" + to_string(_locations[i].end)); } @@ -111,13 +113,13 @@ BOOST_AUTO_TEST_CASE(location_test) } } )"; - shared_ptr<string const> n = make_shared<string>("source"); + shared_ptr<string const> n = make_shared<string>(""); AssemblyItems items = compileContract(sourceCode); vector<SourceLocation> locations = - vector<SourceLocation>(18, SourceLocation(2, 75, n)) + - vector<SourceLocation>(31, SourceLocation(20, 72, n)) + + vector<SourceLocation>(16, SourceLocation(2, 75, n)) + + vector<SourceLocation>(27, SourceLocation(20, 72, n)) + vector<SourceLocation>{SourceLocation(42, 51, n), SourceLocation(65, 67, n)} + - vector<SourceLocation>(4, SourceLocation(58, 67, n)) + + vector<SourceLocation>(2, SourceLocation(58, 67, n)) + vector<SourceLocation>(3, SourceLocation(20, 72, n)); checkAssemblyLocations(items, locations); } |