mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
CommandLineParser: Validate compiler output selection
This commit is contained in:
@@ -289,10 +289,6 @@ BOOST_AUTO_TEST_CASE(assembly_mode_options)
|
||||
"underflow,"
|
||||
"divByZero",
|
||||
"--model-checker-timeout=5", // Ignored in assembly mode
|
||||
|
||||
// Accepted but has no effect in assembly mode
|
||||
"--ast-compact-json", "--asm", "--asm-json", "--opcodes", "--bin", "--bin-runtime", "--abi",
|
||||
"--ir", "--ir-optimized", "--ewasm", "--hashes", "--userdoc", "--devdoc", "--metadata", "--storage-layout",
|
||||
};
|
||||
commandLine += assemblyOptions;
|
||||
if (expectedLanguage == AssemblyStack::Language::StrictAssembly || expectedLanguage == AssemblyStack::Language::Ewasm)
|
||||
@@ -328,11 +324,6 @@ BOOST_AUTO_TEST_CASE(assembly_mode_options)
|
||||
};
|
||||
expectedOptions.formatting.coloredOutput = false;
|
||||
expectedOptions.formatting.withErrorIds = true;
|
||||
expectedOptions.compiler.outputs = {
|
||||
true, true, true, true, true,
|
||||
true, true, true, true, true,
|
||||
true, true, true, true, true,
|
||||
};
|
||||
if (expectedLanguage == AssemblyStack::Language::StrictAssembly || expectedLanguage == AssemblyStack::Language::Ewasm)
|
||||
{
|
||||
expectedOptions.optimizer.enabled = true;
|
||||
@@ -388,10 +379,6 @@ BOOST_AUTO_TEST_CASE(standard_json_mode_options)
|
||||
"underflow,"
|
||||
"divByZero",
|
||||
"--model-checker-timeout=5", // Ignored in Standard JSON mode
|
||||
|
||||
// Accepted but has no effect in Standard JSON mode
|
||||
"--ast-compact-json", "--asm", "--asm-json", "--opcodes", "--bin", "--bin-runtime", "--abi",
|
||||
"--ir", "--ir-optimized", "--ewasm", "--hashes", "--userdoc", "--devdoc", "--metadata", "--storage-layout",
|
||||
};
|
||||
|
||||
CommandLineOptions expectedOptions;
|
||||
@@ -408,11 +395,6 @@ BOOST_AUTO_TEST_CASE(standard_json_mode_options)
|
||||
expectedOptions.formatting.json = JsonFormat {JsonFormat::Pretty, 1};
|
||||
expectedOptions.formatting.coloredOutput = false;
|
||||
expectedOptions.formatting.withErrorIds = true;
|
||||
expectedOptions.compiler.outputs = {
|
||||
true, true, true, true, true,
|
||||
true, true, true, true, true,
|
||||
true, true, true, true, true,
|
||||
};
|
||||
expectedOptions.compiler.estimateGas = true;
|
||||
expectedOptions.compiler.combinedJsonRequests = CombinedJsonRequests{};
|
||||
expectedOptions.compiler.combinedJsonRequests->abi = true;
|
||||
|
||||
Reference in New Issue
Block a user