mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Added call to addOptions virtual helper in CommonOptions::parse to add options from base/derived classes, modified interface of IsolTestOptions to include editor member variable set based on provided parameter in constructor as it is now needed by addOptions helper function
This commit is contained in:
parent
f47e918caa
commit
ae7c617711
@ -144,6 +144,7 @@ void CommonOptions::validate() const
|
||||
bool CommonOptions::parse(int argc, char const* const* argv)
|
||||
{
|
||||
po::variables_map arguments;
|
||||
addOptions();
|
||||
|
||||
po::command_line_parser cmdLineParser(argc, argv);
|
||||
cmdLineParser.options(options);
|
||||
|
@ -70,7 +70,7 @@ struct CommonOptions
|
||||
|
||||
langutil::EVMVersion evmVersion() const;
|
||||
|
||||
virtual addOptions();
|
||||
virtual void addOptions();
|
||||
virtual bool parse(int argc, char const* const* argv);
|
||||
// Throws a ConfigException on error
|
||||
virtual void validate() const;
|
||||
|
@ -59,6 +59,7 @@ std::string editorPath()
|
||||
IsolTestOptions::IsolTestOptions(std::string* _editor):
|
||||
CommonOptions(description)
|
||||
{
|
||||
editor = _editor;
|
||||
enforceViaYul = true;
|
||||
enforceGasTest = (evmVersion() == langutil::EVMVersion{});
|
||||
enforceGasTestMinValue = 100000;
|
||||
|
@ -33,8 +33,9 @@ struct IsolTestOptions: CommonOptions
|
||||
bool noColor = false;
|
||||
bool acceptUpdates = false;
|
||||
std::string testFilter = std::string{};
|
||||
std::string editor = std::string{};
|
||||
|
||||
IsolTestOptions(std::string* _editor);
|
||||
explicit IsolTestOptions(const std::string* _editor);
|
||||
void addOptions() override;
|
||||
bool parse(int _argc, char const* const* _argv) override;
|
||||
void validate() const override;
|
||||
|
Loading…
Reference in New Issue
Block a user