aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-09-26 20:53:44 +0800
committerGitHub <noreply@github.com>2018-09-26 20:53:44 +0800
commit46f630c5a67965acb31dead1ac19373e58097ea2 (patch)
treee51ad9bbd33b6b5c961396aa79dbee097540768f /test
parent83d89e43b167492f0b32f58a6782e8a16e5f5407 (diff)
parent8cfc6c98d631308c4ad9b677c3b6ab254fadc6bd (diff)
downloaddexon-solidity-46f630c5a67965acb31dead1ac19373e58097ea2.tar
dexon-solidity-46f630c5a67965acb31dead1ac19373e58097ea2.tar.gz
dexon-solidity-46f630c5a67965acb31dead1ac19373e58097ea2.tar.bz2
dexon-solidity-46f630c5a67965acb31dead1ac19373e58097ea2.tar.lz
dexon-solidity-46f630c5a67965acb31dead1ac19373e58097ea2.tar.xz
dexon-solidity-46f630c5a67965acb31dead1ac19373e58097ea2.tar.zst
dexon-solidity-46f630c5a67965acb31dead1ac19373e58097ea2.zip
Merge pull request #5092 from ethereum/create2-evmversion
CREATE2 is part of Constantinople now
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index af8465fc..b2e2b63b 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -396,7 +396,7 @@ BOOST_AUTO_TEST_CASE(returndatasize_as_variable)
{Error::Type::Warning, "Variable is shadowed in inline assembly by an instruction of the same name"}
});
if (!dev::test::Options::get().evmVersion().supportsReturndata())
- expectations.emplace_back(make_pair(Error::Type::Warning, std::string("\"returndatasize\" instruction is only available for Byzantium-compatible")));
+ expectations.emplace_back(make_pair(Error::Type::Warning, std::string("\"returndatasize\" instruction is only available for Byzantium-compatible VMs.")));
CHECK_ALLOW_MULTI(text, expectations);
}
@@ -407,10 +407,12 @@ BOOST_AUTO_TEST_CASE(create2_as_variable)
)";
// This needs special treatment, because the message mentions the EVM version,
// so cannot be run via isoltest.
- CHECK_ALLOW_MULTI(text, (std::vector<std::pair<Error::Type, std::string>>{
- {Error::Type::Warning, "Variable is shadowed in inline assembly by an instruction of the same name"},
- {Error::Type::Warning, "The \"create2\" instruction is not supported by the VM version"},
- }));
+ vector<pair<Error::Type, std::string>> expectations(vector<pair<Error::Type, std::string>>{
+ {Error::Type::Warning, "Variable is shadowed in inline assembly by an instruction of the same name"}
+ });
+ if (!dev::test::Options::get().evmVersion().hasCreate2())
+ expectations.emplace_back(make_pair(Error::Type::Warning, std::string("\"create2\" instruction is only available for Constantinople-compatible VMs.")));
+ CHECK_ALLOW_MULTI(text, expectations);
}
BOOST_AUTO_TEST_CASE(getter_is_memory_type)