aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/Metadata.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-07-18 23:51:10 +0800
committerGitHub <noreply@github.com>2017-07-18 23:51:10 +0800
commit01fbc636239f78134b37f9dedeacf40455ee2e0c (patch)
tree33b58cb3ceffed2c2893be6778f005bf763d9e5d /test/libsolidity/Metadata.cpp
parent0eab808ececc9d7b835a5c174731c9eded04bf43 (diff)
parent075715cf151669058251c78b47c0b94fc913e74a (diff)
downloaddexon-solidity-01fbc636239f78134b37f9dedeacf40455ee2e0c.tar
dexon-solidity-01fbc636239f78134b37f9dedeacf40455ee2e0c.tar.gz
dexon-solidity-01fbc636239f78134b37f9dedeacf40455ee2e0c.tar.bz2
dexon-solidity-01fbc636239f78134b37f9dedeacf40455ee2e0c.tar.lz
dexon-solidity-01fbc636239f78134b37f9dedeacf40455ee2e0c.tar.xz
dexon-solidity-01fbc636239f78134b37f9dedeacf40455ee2e0c.tar.zst
dexon-solidity-01fbc636239f78134b37f9dedeacf40455ee2e0c.zip
Merge pull request #2585 from ethereum/tests-compilerstack
Do not use obscure CompilerStack methods in tests
Diffstat (limited to 'test/libsolidity/Metadata.cpp')
-rw-r--r--test/libsolidity/Metadata.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/libsolidity/Metadata.cpp b/test/libsolidity/Metadata.cpp
index 60bb2e4e..32cf910b 100644
--- a/test/libsolidity/Metadata.cpp
+++ b/test/libsolidity/Metadata.cpp
@@ -43,7 +43,9 @@ BOOST_AUTO_TEST_CASE(metadata_stamp)
}
)";
CompilerStack compilerStack;
- BOOST_REQUIRE(compilerStack.compile(std::string(sourceCode)));
+ compilerStack.addSource("", std::string(sourceCode));
+ /// NOTE: compiles without optimisations
+ ETH_TEST_REQUIRE_NO_THROW(compilerStack.compile(), "Compiling contract failed");
bytes const& bytecode = compilerStack.runtimeObject("test").bytecode;
std::string const& metadata = compilerStack.onChainMetadata("test");
BOOST_CHECK(dev::test::isValidMetadata(metadata));