mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Explicity set default values for program options based on initialized values from constructor
This commit is contained in:
parent
f2e59923ab
commit
a875d1225a
@ -95,23 +95,23 @@ CommonOptions::CommonOptions(std::string _caption):
|
||||
|
||||
}
|
||||
|
||||
void CommonOptions::addOptions()
|
||||
void CommonOptions::addOptions()
|
||||
{
|
||||
options.add_options()
|
||||
("evm-version", po::value(&evmVersionString), "which evm version to use")
|
||||
("testpath", po::value<fs::path>(&this->testPath)->default_value(solidity::test::testPath()), "path to test files")
|
||||
("vm", po::value<std::vector<fs::path>>(&vmPaths), "path to evmc library, can be supplied multiple times.")
|
||||
("ewasm", po::bool_switch(&ewasm), "tries to automatically find an ewasm vm and enable ewasm test-execution.")
|
||||
("no-semantic-tests", po::bool_switch(&disableSemanticTests), "disable semantic tests")
|
||||
("no-smt", po::bool_switch(&disableSMT), "disable SMT checker")
|
||||
("optimize", po::bool_switch(&optimize), "enables optimization")
|
||||
("enforce-via-yul", po::bool_switch(&enforceViaYul), "Enforce compiling all tests via yul to see if additional tests can be activated.")
|
||||
("enforce-compile-to-ewasm", po::bool_switch(&enforceCompileToEwasm), "Enforce compiling all tests to Ewasm to see if additional tests can be activated.")
|
||||
("enforce-gas-cost", po::bool_switch(&enforceGasTest), "Enforce checking gas cost in semantic tests.")
|
||||
("enforce-gas-cost-min-value", po::value(&enforceGasTestMinValue), "Threshold value to enforce adding gas checks to a test.")
|
||||
("abiencoderv1", po::bool_switch(&useABIEncoderV1), "enables abi encoder v1")
|
||||
("show-messages", po::bool_switch(&showMessages), "enables message output")
|
||||
("show-metadata", po::bool_switch(&showMetadata), "enables metadata output");
|
||||
("ewasm", po::bool_switch(&ewasm)->default_value(ewasm), "tries to automatically find an ewasm vm and enable ewasm test-execution.")
|
||||
("no-semantic-tests", po::bool_switch(&disableSemanticTests)->default_value(disableSemanticTests), "disable semantic tests")
|
||||
("no-smt", po::bool_switch(&disableSMT)->default_value(disableSMT), "disable SMT checker")
|
||||
("optimize", po::bool_switch(&optimize)->default_value(optimize), "enables optimization")
|
||||
("enforce-via-yul", po::bool_switch(&enforceViaYul)->default_value(enforceViaYul), "Enforce compiling all tests via yul to see if additional tests can be activated.")
|
||||
("enforce-compile-to-ewasm", po::bool_switch(&enforceCompileToEwasm)->default_value(enforceCompileToEwasm), "Enforce compiling all tests to Ewasm to see if additional tests can be activated.")
|
||||
("enforce-gas-cost", po::bool_switch(&enforceGasTest)->default_value(enforceGasTest), "Enforce checking gas cost in semantic tests.")
|
||||
("enforce-gas-cost-min-value", po::value(&enforceGasTestMinValue)->default_value(enforceGasTestMinValue), "Threshold value to enforce adding gas checks to a test.")
|
||||
("abiencoderv1", po::bool_switch(&useABIEncoderV1)->default_value(useABIEncoderV1), "enables abi encoder v1")
|
||||
("show-messages", po::bool_switch(&showMessages)->default_value(showMessages), "enables message output")
|
||||
("show-metadata", po::bool_switch(&showMetadata)->default_value(showMetadata), "enables metadata output");
|
||||
}
|
||||
|
||||
void CommonOptions::validate() const
|
||||
|
@ -70,9 +70,9 @@ void IsolTestOptions::addOptions()
|
||||
CommonOptions::addOptions();
|
||||
options.add_options()
|
||||
("editor", po::value<std::string>(editor)->default_value(editorPath()), "Path to editor for opening test files.")
|
||||
("help", po::bool_switch(&showHelp), "Show this help screen.")
|
||||
("no-color", po::bool_switch(&noColor), "Don't use colors.")
|
||||
("accept-updates", po::bool_switch(&acceptUpdates), "Automatically accept expectation updates.")
|
||||
("help", po::bool_switch(&showHelp)->default_value(showHelp), "Show this help screen.")
|
||||
("no-color", po::bool_switch(&noColor)->default_value(noColor), "Don't use colors.")
|
||||
("accept-updates", po::bool_switch(&acceptUpdates)->default_value(acceptUpdates), "Automatically accept expectation updates.")
|
||||
("test,t", po::value<std::string>(&testFilter)->default_value("*/*"), "Filters which test units to include.");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user