mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix metadata tests
This commit is contained in:
parent
1298a8df14
commit
ca28ce7d7b
@ -75,7 +75,8 @@ BOOST_AUTO_TEST_CASE(metadata_relevant_sources)
|
|||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
compilerStack.addSource("B", std::string(sourceCode));
|
compilerStack.addSource("B", std::string(sourceCode));
|
||||||
ETH_TEST_REQUIRE_NO_THROW(compilerStack.compile(dev::test::Options::get().optimize), "Compiling contract failed");
|
compilerStack.setOptimiserSettings(dev::test::Options::get().optimize);
|
||||||
|
ETH_TEST_REQUIRE_NO_THROW(compilerStack.compile(), "Compiling contract failed");
|
||||||
|
|
||||||
std::string const& serialisedMetadata = compilerStack.metadata("A");
|
std::string const& serialisedMetadata = compilerStack.metadata("A");
|
||||||
BOOST_CHECK(dev::test::isValidMetadata(serialisedMetadata));
|
BOOST_CHECK(dev::test::isValidMetadata(serialisedMetadata));
|
||||||
@ -112,7 +113,8 @@ BOOST_AUTO_TEST_CASE(metadata_relevant_sources_imports)
|
|||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
compilerStack.addSource("C", std::string(sourceCode));
|
compilerStack.addSource("C", std::string(sourceCode));
|
||||||
ETH_TEST_REQUIRE_NO_THROW(compilerStack.compile(dev::test::Options::get().optimize), "Compiling contract failed");
|
compilerStack.setOptimiserSettings(dev::test::Options::get().optimize);
|
||||||
|
ETH_TEST_REQUIRE_NO_THROW(compilerStack.compile(), "Compiling contract failed");
|
||||||
|
|
||||||
std::string const& serialisedMetadata = compilerStack.metadata("C");
|
std::string const& serialisedMetadata = compilerStack.metadata("C");
|
||||||
BOOST_CHECK(dev::test::isValidMetadata(serialisedMetadata));
|
BOOST_CHECK(dev::test::isValidMetadata(serialisedMetadata));
|
||||||
|
Loading…
Reference in New Issue
Block a user