| 44 | using namespace solidity::frontend::test; |
| 45 | |
| 46 | ObjectCompilerTest::ObjectCompilerTest(std::string const& _filename): |
| 47 | solidity::frontend::test::EVMVersionRestrictedTestCase(_filename) |
| 48 | { |
| 49 | m_source = m_reader.source(); |
| 50 | m_optimisationPreset = m_reader.enumSetting<OptimisationPreset>( |
| 51 | "optimizationPreset", |
| 52 | { |
| 53 | {"none", OptimisationPreset::None}, |
| 54 | {"minimal", OptimisationPreset::Minimal}, |
| 55 | {"standard", OptimisationPreset::Standard}, |
| 56 | {"full", OptimisationPreset::Full}, |
| 57 | }, |
| 58 | "minimal" |
| 59 | ); |
| 60 | |
| 61 | constexpr std::array allowedOutputs = {"Assembly", "Bytecode", "Opcodes", "SourceMappings"}; |
| 62 | boost::split(m_outputSetting, m_reader.stringSetting("outputs", "Assembly,Bytecode,Opcodes,SourceMappings"), boost::is_any_of(",")); |
| 63 | for (auto const& output: m_outputSetting) |
| 64 | if (std::find(allowedOutputs.begin(), allowedOutputs.end(), output) == allowedOutputs.end()) |
| 65 | BOOST_THROW_EXCEPTION(std::runtime_error{"Invalid output type: \"" + output + "\""}); |
| 66 | |
| 67 | m_expectation = m_reader.simpleExpectations(); |
| 68 | } |
| 69 | |
| 70 | TestCase::TestResult ObjectCompilerTest::run(std::ostream& _stream, std::string const& _linePrefix, bool const _formatted) |
| 71 | { |
nothing calls this directly
no test coverage detected