CommandLineParser: Validate compiler output selection

This commit is contained in:
Kamil Śliwak
2021-10-06 20:09:33 +02:00
parent aed218fd75
commit b9b2c69d24
17 changed files with 64 additions and 21 deletions
-18
View File
@@ -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;