| 37 | { |
| 38 | |
| 39 | std::map<std::string, std::string> requireParsedCBORMetadata(bytes const& _bytecode, CompilerStack::MetadataFormat _metadataFormat) |
| 40 | { |
| 41 | bytes cborMetadata = solidity::test::onlyMetadata(_bytecode); |
| 42 | if (_metadataFormat != CompilerStack::MetadataFormat::NoMetadata) |
| 43 | { |
| 44 | BOOST_REQUIRE(!cborMetadata.empty()); |
| 45 | std::optional<std::map<std::string, std::string>> tmp = solidity::test::parseCBORMetadata(cborMetadata); |
| 46 | BOOST_REQUIRE(tmp); |
| 47 | return *tmp; |
| 48 | } |
| 49 | BOOST_REQUIRE(cborMetadata.empty()); |
| 50 | return {}; |
| 51 | } |
| 52 | |
| 53 | std::optional<std::string> compileAndCheckLicenseMetadata(std::string const& _contractName, char const* _sourceCode) |
| 54 | { |
no test coverage detected