From a63d850f5053d26d0ca9868ecd0a293824414b96 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 12 Nov 2020 14:50:51 +0000 Subject: [PATCH] Improve ewasm commandline tests --- .../input.json | 2 +- .../output.json | 2 +- .../input.json | 22 +++++++++++++++++++ .../output.json | 2 ++ 4 files changed, 26 insertions(+), 2 deletions(-) rename test/cmdlineTests/{standard_eWasm_requested => standard_ewasm_requested}/input.json (85%) rename test/cmdlineTests/{standard_eWasm_requested => standard_ewasm_requested}/output.json (74%) create mode 100644 test/cmdlineTests/standard_ewasm_requested_abstract/input.json create mode 100644 test/cmdlineTests/standard_ewasm_requested_abstract/output.json diff --git a/test/cmdlineTests/standard_eWasm_requested/input.json b/test/cmdlineTests/standard_ewasm_requested/input.json similarity index 85% rename from test/cmdlineTests/standard_eWasm_requested/input.json rename to test/cmdlineTests/standard_ewasm_requested/input.json index 25cc1705d..d3c6cc892 100644 --- a/test/cmdlineTests/standard_eWasm_requested/input.json +++ b/test/cmdlineTests/standard_ewasm_requested/input.json @@ -16,7 +16,7 @@ }, "outputSelection": { - "*": { "*": ["ewasm.wast"] } + "*": { "*": ["ewasm.wast", "ewasm.wasm"] } } } } diff --git a/test/cmdlineTests/standard_eWasm_requested/output.json b/test/cmdlineTests/standard_ewasm_requested/output.json similarity index 74% rename from test/cmdlineTests/standard_eWasm_requested/output.json rename to test/cmdlineTests/standard_ewasm_requested/output.json index f7a0debaa..a4224fbab 100644 --- a/test/cmdlineTests/standard_eWasm_requested/output.json +++ b/test/cmdlineTests/standard_ewasm_requested/output.json @@ -1,4 +1,4 @@ -{"contracts":{"A":{"C":{"ewasm":{"wast":"(module +{"contracts":{"A":{"C":{"ewasm":{"wasm":"0061736d01000000013a0860000060017e017e60047e7e7e7e017f60087e7e7e7e7e7e7e7e00600c7e7e7e7e7e7e7e7e7e7e7e7e0060017f0060027f7f0060037f7f7f0002510408657468657265756d08636f6465436f7079000708657468657265756d06726576657274000608657468657265756d0c67657443616c6c56616c7565000508657468657265756d0666696e6973680006030a090002020401010103030503010001060100071102066d656d6f72790200046d61696e0004009d030c435f325f6465706c6f7965640061736d0100000001160460000060017e017e60047e7e7e7e017f60027f7f0002130108657468657265756d067265766572740003030504000201010503010001060100071102066d656d6f72790200046d61696e00010ab60204ca0104017e027f057e037f02404200210020002000200042c00010022101200141c0006a210220022001490440000b20001003421086210320032000421088100384422086210420042000422088100484210520022005370000200241086a2005370000200241106a20053700004280011003421086210620064280014210881003844220862107200241186a2007428001422088100484370000200020002000200010022108200020002000200010022109200941c0006a210a200a2009490440000b200a200810000b0b2901017f024042002000200184200284520440000b42002003422088520440000b2003a721040b20040b1f01017e024020004208864280fe0383200042088842ff01838421010b20010b1e01027e02402000100342108621022002200042108810038421010b20010b0aec0309dc0103017e027f057e02404200210020002000200042c00010052101200141c0006a210220022001490440000b2000100a210320022003370000200241086a2003370000200241106a2003370000200241186a428001100a370000410010024100290000100a2104410041086a290000100a2105410041106a290000100a210620042005842006410041186a290000100a84845045044020002000200020002000200020002000100c0b4290032107200020002000200020002000200042ce012000200020002007100720002000200020002000200020002007100b0b0b2901017f024042002000200184200284520440000b42002003422088520440000b2003a721040b20040b2601027f0240200020012002200310052105200541c0006a210420042005490440000b0b20040b25000240200020012002200310062004200520062007100520082009200a200b100510000b0b1f01017e024020004208864280fe0383200042088842ff01838421010b20010b1e01027e02402000100842108621022002200042108810088421010b20010b1e01027e02402000100942208621022002200042208810098421010b20010b1b000240200020012002200310062004200520062007100510030b0b1b000240200020012002200310062004200520062007100510010b0b","wast":"(module ;; custom section for sub-module ;; The Keccak-256 hash of the text representation of \"C_2_deployed\": f03f5b9154b9eb6803a947177e38e92e2860de95e90ba0e75eb71a58f18ed589 ;; (@custom \"C_2_deployed\" \"0061736d0100000001160460000060017e017e60047e7e7e7e017f60027f7f0002130108657468657265756d067265766572740003030504000201010503010001060100071102066d656d6f72790200046d61696e00010ab60204ca0104017e027f057e037f02404200210020002000200042c00010022101200141c0006a210220022001490440000b20001003421086210320032000421088100384422086210420042000422088100484210520022005370000200241086a2005370000200241106a20053700004280011003421086210620064280014210881003844220862107200241186a2007428001422088100484370000200020002000200010022108200020002000200010022109200941c0006a210a200a2009490440000b200a200810000b0b2901017f024042002000200184200284520440000b42002003422088520440000b2003a721040b20040b1f01017e024020004208864280fe0383200042088842ff01838421010b20010b1e01027e02402000100342108621022002200042108810038421010b20010b\") diff --git a/test/cmdlineTests/standard_ewasm_requested_abstract/input.json b/test/cmdlineTests/standard_ewasm_requested_abstract/input.json new file mode 100644 index 000000000..313fa478c --- /dev/null +++ b/test/cmdlineTests/standard_ewasm_requested_abstract/input.json @@ -0,0 +1,22 @@ +{ + "language": "Solidity", + "sources": + { + "A": + { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0; abstract contract C { }" + } + }, + "settings": + { + "optimizer": + { + "enabled": true, + "details": {"yul": true} + }, + "outputSelection": + { + "*": { "*": ["ewasm.wast", "ewasm.wasm"] } + } + } +} diff --git a/test/cmdlineTests/standard_ewasm_requested_abstract/output.json b/test/cmdlineTests/standard_ewasm_requested_abstract/output.json new file mode 100644 index 000000000..55ff78db9 --- /dev/null +++ b/test/cmdlineTests/standard_ewasm_requested_abstract/output.json @@ -0,0 +1,2 @@ +{"errors":[{"component":"general","formattedMessage":"InternalCompilerError: +","message":"Internal compiler error (/project/solidity/libsolidity/interface/CompilerStack.cpp:1260):","severity":"error","type":"InternalCompilerError"}],"sources":{"A":{"id":0}}}