From 1aac4d1a4c00ca87c0eac67f4726be95b0b00db2 Mon Sep 17 00:00:00 2001 From: Alexander Arlt Date: Wed, 26 Apr 2023 20:09:20 -0500 Subject: [PATCH] [test] cmdLineTests: add test that checks behavior of non unique sources. --- .../asm_json_import_non_unique_sources/args | 1 + .../asm_json_import_non_unique_sources/err | 1 + .../asm_json_import_non_unique_sources/exit | 1 + .../asm_json_import_non_unique_sources/stdin | 23 +++++++++++++++++++ 4 files changed, 26 insertions(+) create mode 100644 test/cmdlineTests/asm_json_import_non_unique_sources/args create mode 100644 test/cmdlineTests/asm_json_import_non_unique_sources/err create mode 100644 test/cmdlineTests/asm_json_import_non_unique_sources/exit create mode 100644 test/cmdlineTests/asm_json_import_non_unique_sources/stdin diff --git a/test/cmdlineTests/asm_json_import_non_unique_sources/args b/test/cmdlineTests/asm_json_import_non_unique_sources/args new file mode 100644 index 000000000..d27cc7bb2 --- /dev/null +++ b/test/cmdlineTests/asm_json_import_non_unique_sources/args @@ -0,0 +1 @@ +--asm-json --import-asm-json - diff --git a/test/cmdlineTests/asm_json_import_non_unique_sources/err b/test/cmdlineTests/asm_json_import_non_unique_sources/err new file mode 100644 index 000000000..5ba74fc8a --- /dev/null +++ b/test/cmdlineTests/asm_json_import_non_unique_sources/err @@ -0,0 +1 @@ +Assembly Import Error: Items in 'sourceList' array are not unique. diff --git a/test/cmdlineTests/asm_json_import_non_unique_sources/exit b/test/cmdlineTests/asm_json_import_non_unique_sources/exit new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/test/cmdlineTests/asm_json_import_non_unique_sources/exit @@ -0,0 +1 @@ +1 diff --git a/test/cmdlineTests/asm_json_import_non_unique_sources/stdin b/test/cmdlineTests/asm_json_import_non_unique_sources/stdin new file mode 100644 index 000000000..8264c0c1d --- /dev/null +++ b/test/cmdlineTests/asm_json_import_non_unique_sources/stdin @@ -0,0 +1,23 @@ +{ + ".code": [ + { + "name": "PUSH", + "value": "0" + } + ], + ".data": { + "0": { + ".code": [ + { + "name": "PUSH", + "value": "1" + } + ] + } + }, + "sourceList": [ + "contract.sol", + "contract.sol", + "#utility.yul" + ] +}