Update source location tests.

This commit is contained in:
chriseth 2020-12-02 15:49:41 +01:00
parent 3f5925e1c3
commit dff7dcdc27
2 changed files with 11 additions and 11 deletions

View File

@ -1 +1 @@
{"contracts":{"a.sol":{"A":{"evm":{"deployedBytecode":{"immutableReferences":{"6":[{"length":32,"start":77}]}}}}}},"sources":{"a.sol":{"id":0}}}
{"contracts":{"a.sol":{"A":{"evm":{"deployedBytecode":{"immutableReferences":{"6":[{"length":32,"start":75}]}}}}}},"sources":{"a.sol":{"id":0}}}

View File

@ -173,18 +173,18 @@ BOOST_AUTO_TEST_CASE(location_test)
vector<SourceLocation> locations;
if (solidity::test::CommonOptions::get().optimize)
locations =
vector<SourceLocation>(31, SourceLocation{2, 82, sourceCode}) +
vector<SourceLocation>(21, SourceLocation{20, 79, sourceCode}) +
vector<SourceLocation>(1, SourceLocation{72, 74, sourceCode}) +
vector<SourceLocation>(2, SourceLocation{20, 79, sourceCode});
vector<SourceLocation>(31, SourceLocation{23, 103, sourceCode}) +
vector<SourceLocation>(21, SourceLocation{41, 100, sourceCode}) +
vector<SourceLocation>(1, SourceLocation{93, 95, sourceCode}) +
vector<SourceLocation>(2, SourceLocation{41, 100, sourceCode});
else
locations =
vector<SourceLocation>(hasShifts ? 31 : 32, SourceLocation{2, 82, sourceCode}) +
vector<SourceLocation>(24, SourceLocation{20, 79, sourceCode}) +
vector<SourceLocation>(1, SourceLocation{49, 58, sourceCode}) +
vector<SourceLocation>(1, SourceLocation{72, 74, sourceCode}) +
vector<SourceLocation>(2, SourceLocation{65, 74, sourceCode}) +
vector<SourceLocation>(2, SourceLocation{20, 79, sourceCode});
vector<SourceLocation>(hasShifts ? 31 : 32, SourceLocation{23, 103, sourceCode}) +
vector<SourceLocation>(24, SourceLocation{41, 100, sourceCode}) +
vector<SourceLocation>(1, SourceLocation{70, 79, sourceCode}) +
vector<SourceLocation>(1, SourceLocation{93, 95, sourceCode}) +
vector<SourceLocation>(2, SourceLocation{86, 95, sourceCode}) +
vector<SourceLocation>(2, SourceLocation{41, 100, sourceCode});
checkAssemblyLocations(items, locations);
}