From 92b5a26b800aefee0e3672de24369d41b5db4e4f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 16 Jun 2026 16:56:32 +0000 Subject: [PATCH 1/3] testrunner: show text-calldata on failing dispatch tests Add a text-calldata description to every dispatch test case (folding existing comment fields into it) and print it from the testrunner whenever a test fails, so failures identify which call was exercised. Co-authored-by: Alex Beregszaszi --- test/examples/dispatch/Revert.json | 1 + test/examples/dispatch/basic.json | 53 ++++++++++++++------------- test/examples/dispatch/concat.json | 1 + test/examples/dispatch/ecrecover.json | 1 + test/examples/dispatch/fallback.json | 1 + test/examples/dispatch/hashes.json | 1 + test/examples/dispatch/memory.json | 1 + test/examples/dispatch/miniERC20.json | 17 ++++----- test/examples/dispatch/neg.json | 7 ++-- test/examples/dispatch/ownable.json | 10 ++--- test/examples/dispatch/slices.json | 1 + test/examples/dispatch/template.json | 2 + test/testrunner/testrunner.cpp | 29 ++++++++++----- 13 files changed, 71 insertions(+), 54 deletions(-) diff --git a/test/examples/dispatch/Revert.json b/test/examples/dispatch/Revert.json index a82bdee28..bf1d2aeb0 100644 --- a/test/examples/dispatch/Revert.json +++ b/test/examples/dispatch/Revert.json @@ -5,6 +5,7 @@ "tests": [ { "input": { + "text-calldata": "constructor()", "calldata": "", "value": "0" }, diff --git a/test/examples/dispatch/basic.json b/test/examples/dispatch/basic.json index 3e60ff041..8a1e1a39d 100644 --- a/test/examples/dispatch/basic.json +++ b/test/examples/dispatch/basic.json @@ -5,6 +5,7 @@ "tests": [ { "input": { + "text-calldata": "constructor()", "calldata": "", "value": "0" }, @@ -12,7 +13,7 @@ }, { "input": { - "text-calldata": "nothing()", + "text-calldata": "nothing()", "calldata": "448f30a3", "value": "0" }, @@ -24,7 +25,7 @@ }, { "input": { - "text-calldata": "something()(uint256)", + "text-calldata": "something()(uint256)", "calldata": "a7a0d537", "value": "0" }, @@ -36,7 +37,7 @@ }, { "input": { - "text-calldata": "add2(uint256,uint256)(uint256) 2 3", + "text-calldata": "add2(uint256,uint256)(uint256) 2 3", "calldata": "0x29fcda3300000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003", "value": "0" }, @@ -48,7 +49,7 @@ }, { "input": { - "text-calldata": "add3(uint256,uint256,uint256)(uint256) 2 3 4", + "text-calldata": "add3(uint256,uint256,uint256)(uint256) 2 3 4", "calldata": "0x3faee853000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004", "value": "0" }, @@ -61,12 +62,12 @@ { "input": { "text-calldata": "id_bytes32(bytes32) -> (bytes32)", - "calldata":"0x10a4b2d4deadbeefcafebabe000000000000000000000000000000000000000000000000", + "calldata": "0x10a4b2d4deadbeefcafebabe000000000000000000000000000000000000000000000000", "value": "0" }, "kind": "call", "output": { - "returndata":"deadbeefcafebabe000000000000000000000000000000000000000000000000", + "returndata": "deadbeefcafebabe000000000000000000000000000000000000000000000000", "status": "success" } }, @@ -85,120 +86,120 @@ { "input": { "text-calldata": "id_bytes(bytes) -> (bytes)", - "calldata":"0xbb1ec80900000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", + "calldata": "0xbb1ec80900000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "value": "0" }, "kind": "call", "output": { - "returndata":"00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", + "returndata": "00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "status": "success" } }, { "input": { "text-calldata": "id_string(string) -> (string)", - "calldata":"0x145ef75500000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", + "calldata": "0x145ef75500000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "value": "0" }, "kind": "call", "output": { - "returndata":"00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", + "returndata": "00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "status": "success" } }, { "input": { "text-calldata": "id_bytes(bytes) with offset but no length/content (head OK, tail truncated)", - "calldata":"0xbb1ec8090000000000000000000000000000000000000000000000000000000000000020", + "calldata": "0xbb1ec8090000000000000000000000000000000000000000000000000000000000000020", "value": "0" }, "kind": "call", "output": { - "returndata":"00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000", + "returndata": "00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000", "status": "success" } }, { "input": { "text-calldata": "id_string(string) with offset+length=4 but content truncated", - "calldata":"0x145ef75500000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004", + "calldata": "0x145ef75500000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004", "value": "0" }, "kind": "call", "output": { - "returndata":"000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000", + "returndata": "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000", "status": "success" } }, { "input": { "text-calldata": "selector too short (same error as missing fallback)", - "calldata":"c0de", + "calldata": "c0de", "value": "0" }, "kind": "call", "output": { - "returndata":"4924aef0", + "returndata": "4924aef0", "status": "failure" } }, { "input": { "text-calldata": "empty calldata (cdsz == 0) -- the 'plain ETH transfer' shape", - "calldata":"", + "calldata": "", "value": "0" }, "kind": "call", "output": { - "returndata":"4924aef0", + "returndata": "4924aef0", "status": "failure" } }, { "input": { "text-calldata": "abi data too short -- using id_string(string)", - "calldata":"145ef755", + "calldata": "145ef755", "value": "0" }, "kind": "call", "output": { - "returndata":"08638556", + "returndata": "08638556", "status": "failure" } }, { "input": { "text-calldata": "value sent for non-payable function", - "calldata":"a7a0d537", + "calldata": "a7a0d537", "value": "42" }, "kind": "call", "output": { - "returndata":"b5988ea3", + "returndata": "b5988ea3", "status": "failure" } }, { "input": { "text-calldata": "missing fallback", - "calldata":"deadc0de", + "calldata": "deadc0de", "value": "0" }, "kind": "call", "output": { - "returndata":"4924aef0", + "returndata": "4924aef0", "status": "failure" } }, { "input": { "text-calldata": "non-public hidden() must not be dispatched", - "calldata":"aef6d4b1", + "calldata": "aef6d4b1", "value": "0" }, "kind": "call", "output": { - "returndata":"4924aef0", + "returndata": "4924aef0", "status": "failure" } } diff --git a/test/examples/dispatch/concat.json b/test/examples/dispatch/concat.json index 72f55105d..98f14132c 100644 --- a/test/examples/dispatch/concat.json +++ b/test/examples/dispatch/concat.json @@ -5,6 +5,7 @@ "tests": [ { "input": { + "text-calldata": "constructor()", "calldata": "", "value": "0" }, diff --git a/test/examples/dispatch/ecrecover.json b/test/examples/dispatch/ecrecover.json index 3e4a2b135..196be387a 100644 --- a/test/examples/dispatch/ecrecover.json +++ b/test/examples/dispatch/ecrecover.json @@ -5,6 +5,7 @@ "tests": [ { "input": { + "text-calldata": "constructor()", "calldata": "", "value": "0" }, diff --git a/test/examples/dispatch/fallback.json b/test/examples/dispatch/fallback.json index 5053ede01..c96b5a260 100644 --- a/test/examples/dispatch/fallback.json +++ b/test/examples/dispatch/fallback.json @@ -5,6 +5,7 @@ "tests": [ { "input": { + "text-calldata": "constructor()", "calldata": "", "value": "0" }, diff --git a/test/examples/dispatch/hashes.json b/test/examples/dispatch/hashes.json index c7ef7297d..be141fd34 100644 --- a/test/examples/dispatch/hashes.json +++ b/test/examples/dispatch/hashes.json @@ -5,6 +5,7 @@ "tests": [ { "input": { + "text-calldata": "constructor()", "calldata": "", "value": "0" }, diff --git a/test/examples/dispatch/memory.json b/test/examples/dispatch/memory.json index 622f63db8..ca7d4235b 100644 --- a/test/examples/dispatch/memory.json +++ b/test/examples/dispatch/memory.json @@ -5,6 +5,7 @@ "tests": [ { "input": { + "text-calldata": "constructor()", "calldata": "", "value": "0" }, diff --git a/test/examples/dispatch/miniERC20.json b/test/examples/dispatch/miniERC20.json index 5a7514626..f6daa686f 100644 --- a/test/examples/dispatch/miniERC20.json +++ b/test/examples/dispatch/miniERC20.json @@ -1,20 +1,19 @@ { "miniERC20": { "bytecode": "_CODE", - "contract": "MiniERC20", + "contract": "MiniERC20", "tests": [ { - "input": { - "comment": "'constructor(string,string,uint)' Argot ARG 1000", + "input": { + "text-calldata": "'constructor(string,string,uint)' Argot ARG 1000", "calldata": "000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000054172676f7400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034152470000000000000000000000000000000000000000000000000000000000", "value": "0" }, "kind": "constructor" }, - { "input": { - "comment": "transfer(address,uint)(bool) $ANVIL1 958", + "text-calldata": "transfer(address,uint)(bool) $ANVIL1 958", "calldata": "a9059cbb00000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c800000000000000000000000000000000000000000000000000000000000003be", "value": "0" }, @@ -24,12 +23,11 @@ "status": "success" } }, - { "input": { - "comment": "getMyBalance()", - "calldata": "0x4c738909", - "value": "0" + "text-calldata": "getMyBalance()", + "calldata": "0x4c738909", + "value": "0" }, "kind": "call", "output": { @@ -38,6 +36,5 @@ } } ] - } } diff --git a/test/examples/dispatch/neg.json b/test/examples/dispatch/neg.json index c92c13a42..c116f9eb7 100644 --- a/test/examples/dispatch/neg.json +++ b/test/examples/dispatch/neg.json @@ -5,6 +5,7 @@ "tests": [ { "input": { + "text-calldata": "constructor()", "calldata": "", "value": "0" }, @@ -12,9 +13,9 @@ }, { "input": { - "text-calldata": "negPair()", - "calldata": "ce61a134", - "value": "0" + "text-calldata": "negPair()", + "calldata": "ce61a134", + "value": "0" }, "kind": "call", "output": { diff --git a/test/examples/dispatch/ownable.json b/test/examples/dispatch/ownable.json index b710d7f12..8bf75e2db 100644 --- a/test/examples/dispatch/ownable.json +++ b/test/examples/dispatch/ownable.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "comment": "constructor()", + "text-calldata": "constructor()", "calldata": "", "value": "0" }, @@ -13,7 +13,7 @@ }, { "input": { - "comment": "getOwner()(address) - should return deployer address", + "text-calldata": "getOwner()(address) - should return deployer address", "calldata": "893d20e8", "value": "0" }, @@ -25,7 +25,7 @@ }, { "input": { - "comment": "changeOwner(address) to 0xdead - should succeed from owner", + "text-calldata": "changeOwner(address) to 0xdead - should succeed from owner", "calldata": "a6f9dae1000000000000000000000000000000000000000000000000000000000000dead", "value": "0" }, @@ -37,7 +37,7 @@ }, { "input": { - "comment": "getOwner()(address) - should now return 0xdead", + "text-calldata": "getOwner()(address) - should now return 0xdead", "calldata": "893d20e8", "value": "0" }, @@ -49,7 +49,7 @@ }, { "input": { - "comment": "changeOwner(address) - should fail, caller is no longer owner", + "text-calldata": "changeOwner(address) - should fail, caller is no longer owner", "calldata": "a6f9dae1000000000000000000000000000000000000000000000000000000000000beef", "value": "0" }, diff --git a/test/examples/dispatch/slices.json b/test/examples/dispatch/slices.json index 75381c9c9..ae5e34599 100644 --- a/test/examples/dispatch/slices.json +++ b/test/examples/dispatch/slices.json @@ -5,6 +5,7 @@ "tests": [ { "input": { + "text-calldata": "constructor()", "calldata": "", "value": "0" }, diff --git a/test/examples/dispatch/template.json b/test/examples/dispatch/template.json index 328759686..b1ecbb477 100644 --- a/test/examples/dispatch/template.json +++ b/test/examples/dispatch/template.json @@ -5,6 +5,7 @@ "tests": [ { "input": { + "text-calldata": "constructor()", "calldata": "", "value": "0" }, @@ -12,6 +13,7 @@ }, { "input": { + "text-calldata": "26121ff0", "calldata": "26121ff0", "value": "0" }, diff --git a/test/testrunner/testrunner.cpp b/test/testrunner/testrunner.cpp index 01d79d35d..6bd1adf0a 100644 --- a/test/testrunner/testrunner.cpp +++ b/test/testrunner/testrunner.cpp @@ -96,6 +96,15 @@ int main(int argc, char** argv) message.sender = EVMHost::convertToEVMC(sender); message.value = EVMHost::convertToEVMC(u256(test["input"]["value"].get())); auto kind = test["kind"].get(); + + // Human-readable description of the call, shown when the test fails. + std::string const textCalldata = test["input"].value("text-calldata", std::string{}); + auto reportFailure = [&](std::string const& _reason) { + std::cerr << _reason; + if (!textCalldata.empty()) + std::cerr << " (text-calldata: " << textCalldata << ")"; + std::cerr << std::endl; + }; if (kind == "constructor") { input = bytecode + input; @@ -116,7 +125,7 @@ int main(int argc, char** argv) } else { - std::cerr << "Unrecognized kind: " << kind << std::endl; + reportFailure("Unrecognized kind: " + kind); hasTestFailure = true; resultRecorder.record(filename, "Unrecognized kind of test", kind, R"("constructor" or "call")", 0, 0); continue; @@ -153,7 +162,7 @@ int main(int argc, char** argv) { if (status) { - std::cerr << "Expected creation failure but got success" << std::endl; + reportFailure("Expected creation failure but got success"); resultRecorder.record(filename, "Expected constructor status failure but got success.", "success", expectedStatus, gasUsed, gasUsedForDeposit); hasTestFailure = true; continue; @@ -163,7 +172,7 @@ int main(int argc, char** argv) { if (!status) { - std::cerr << "Expected creation success but got failure" << std::endl; + reportFailure("Expected creation success but got failure"); resultRecorder.record(filename, "Expected constructor status success but got failure.", "failure", expectedStatus, gasUsed, gasUsedForDeposit); hasTestFailure = true; continue; @@ -171,7 +180,7 @@ int main(int argc, char** argv) } else { - std::cerr << "Unsupported expectedStatus: " << expectedStatus << std::endl; + reportFailure("Unsupported expectedStatus: " + expectedStatus); resultRecorder.record(filename, "Unsupported constructor status expectation.", "failure", expectedStatus, gasUsed, gasUsedForDeposit); hasTestFailure = true; continue; @@ -181,7 +190,7 @@ int main(int argc, char** argv) auto expectedOutput = test["output"]["returndata"].get(); if (output != fromHex(expectedOutput)) { - std::cerr << "Expected " << expectedOutput << " but got " << toHex(output) << std::endl; + reportFailure("Expected " + expectedOutput + " but got " + toHex(output)); resultRecorder.record(filename, "Expected different constructor output.", toHex(output), expectedOutput, gasUsed, gasUsedForDeposit); hasTestFailure = true; continue; @@ -193,7 +202,7 @@ int main(int argc, char** argv) { if (!status) { - std::cerr << "Creation failed." << std::endl; + reportFailure("Creation failed."); resultRecorder.record(filename, "Creation failed for constructor test.", "", "", gasUsed, gasUsedForDeposit); hasTestFailure = true; continue; @@ -208,7 +217,7 @@ int main(int argc, char** argv) { if (status) { - std::cerr << "Expected failure but got success" << std::endl; + reportFailure("Expected failure but got success"); resultRecorder.record(filename, "Expected test status failure but got success.", "success", expectedStatus, gasUsed, gasUsedForDeposit); hasTestFailure = true; continue; @@ -218,7 +227,7 @@ int main(int argc, char** argv) { if (!status) { - std::cerr << "Expected success but got failure" << std::endl; + reportFailure("Expected success but got failure"); resultRecorder.record(filename, "Expected test status success but got failure.", "failure", expectedStatus, gasUsed, gasUsedForDeposit); hasTestFailure = true; continue; @@ -226,7 +235,7 @@ int main(int argc, char** argv) } else { - std::cerr << "Unsupported expectedStatus: " << expectedStatus << std::endl; + reportFailure("Unsupported expectedStatus: " + expectedStatus); resultRecorder.record(filename, "Unsupported status expectation.", "failure", expectedStatus, gasUsed, gasUsedForDeposit); hasTestFailure = true; continue; @@ -234,7 +243,7 @@ int main(int argc, char** argv) auto expectedOutput = test["output"]["returndata"].get(); if (output != fromHex(expectedOutput)) { - std::cerr << "Expected " << expectedOutput << " but got " << toHex(output) << std::endl; + reportFailure("Expected " + expectedOutput + " but got " + toHex(output)); resultRecorder.record(filename, "Expected different output.", toHex(output), expectedOutput, gasUsed, gasUsedForDeposit); hasTestFailure = true; continue; From 8d77a0c69f5cd8af35daee54fecfdf482d856db9 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 18 Jun 2026 12:34:10 +0000 Subject: [PATCH 2/3] testrunner: rename test input field text-calldata to comment The field stored a human-readable description of the call, not the calldata itself. Rename it to `comment` across the dispatch JSON fixtures and the testrunner reader. Co-authored-by: Alex Beregszaszi --- test/examples/dispatch/Revert.json | 6 +- test/examples/dispatch/basic.json | 34 +++++----- test/examples/dispatch/concat.json | 42 ++++++------- test/examples/dispatch/ecrecover.json | 4 +- test/examples/dispatch/fallback.json | 10 +-- test/examples/dispatch/hashes.json | 8 +-- test/examples/dispatch/memory.json | 6 +- test/examples/dispatch/miniERC20.json | 6 +- test/examples/dispatch/neg.json | 4 +- test/examples/dispatch/nonpayable_ctor.json | 2 +- test/examples/dispatch/ownable.json | 10 +-- test/examples/dispatch/payable.json | 16 ++--- test/examples/dispatch/payable_ctor.json | 4 +- test/examples/dispatch/slices.json | 70 ++++++++++----------- test/examples/dispatch/template.json | 4 +- test/testrunner/testrunner.cpp | 6 +- 16 files changed, 116 insertions(+), 116 deletions(-) diff --git a/test/examples/dispatch/Revert.json b/test/examples/dispatch/Revert.json index bf1d2aeb0..b971e27fc 100644 --- a/test/examples/dispatch/Revert.json +++ b/test/examples/dispatch/Revert.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "constructor()", + "comment": "constructor()", "calldata": "", "value": "0" }, @@ -13,7 +13,7 @@ }, { "input": { - "text-calldata": "noAnswer()", + "comment": "noAnswer()", "calldata": "08ad856f", "value": "0" }, @@ -25,7 +25,7 @@ }, { "input": { - "text-calldata": "answer()(uint256)", + "comment": "answer()(uint256)", "calldata": "85bb7d69", "value": "0" }, diff --git a/test/examples/dispatch/basic.json b/test/examples/dispatch/basic.json index 8a1e1a39d..8ca54c782 100644 --- a/test/examples/dispatch/basic.json +++ b/test/examples/dispatch/basic.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "constructor()", + "comment": "constructor()", "calldata": "", "value": "0" }, @@ -13,7 +13,7 @@ }, { "input": { - "text-calldata": "nothing()", + "comment": "nothing()", "calldata": "448f30a3", "value": "0" }, @@ -25,7 +25,7 @@ }, { "input": { - "text-calldata": "something()(uint256)", + "comment": "something()(uint256)", "calldata": "a7a0d537", "value": "0" }, @@ -37,7 +37,7 @@ }, { "input": { - "text-calldata": "add2(uint256,uint256)(uint256) 2 3", + "comment": "add2(uint256,uint256)(uint256) 2 3", "calldata": "0x29fcda3300000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003", "value": "0" }, @@ -49,7 +49,7 @@ }, { "input": { - "text-calldata": "add3(uint256,uint256,uint256)(uint256) 2 3 4", + "comment": "add3(uint256,uint256,uint256)(uint256) 2 3 4", "calldata": "0x3faee853000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004", "value": "0" }, @@ -61,7 +61,7 @@ }, { "input": { - "text-calldata": "id_bytes32(bytes32) -> (bytes32)", + "comment": "id_bytes32(bytes32) -> (bytes32)", "calldata": "0x10a4b2d4deadbeefcafebabe000000000000000000000000000000000000000000000000", "value": "0" }, @@ -73,7 +73,7 @@ }, { "input": { - "text-calldata": "id_pair()(uint256,uint256)", + "comment": "id_pair()(uint256,uint256)", "calldata": "5880a1a0", "value": "0" }, @@ -85,7 +85,7 @@ }, { "input": { - "text-calldata": "id_bytes(bytes) -> (bytes)", + "comment": "id_bytes(bytes) -> (bytes)", "calldata": "0xbb1ec80900000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -97,7 +97,7 @@ }, { "input": { - "text-calldata": "id_string(string) -> (string)", + "comment": "id_string(string) -> (string)", "calldata": "0x145ef75500000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -109,7 +109,7 @@ }, { "input": { - "text-calldata": "id_bytes(bytes) with offset but no length/content (head OK, tail truncated)", + "comment": "id_bytes(bytes) with offset but no length/content (head OK, tail truncated)", "calldata": "0xbb1ec8090000000000000000000000000000000000000000000000000000000000000020", "value": "0" }, @@ -121,7 +121,7 @@ }, { "input": { - "text-calldata": "id_string(string) with offset+length=4 but content truncated", + "comment": "id_string(string) with offset+length=4 but content truncated", "calldata": "0x145ef75500000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004", "value": "0" }, @@ -133,7 +133,7 @@ }, { "input": { - "text-calldata": "selector too short (same error as missing fallback)", + "comment": "selector too short (same error as missing fallback)", "calldata": "c0de", "value": "0" }, @@ -145,7 +145,7 @@ }, { "input": { - "text-calldata": "empty calldata (cdsz == 0) -- the 'plain ETH transfer' shape", + "comment": "empty calldata (cdsz == 0) -- the 'plain ETH transfer' shape", "calldata": "", "value": "0" }, @@ -157,7 +157,7 @@ }, { "input": { - "text-calldata": "abi data too short -- using id_string(string)", + "comment": "abi data too short -- using id_string(string)", "calldata": "145ef755", "value": "0" }, @@ -169,7 +169,7 @@ }, { "input": { - "text-calldata": "value sent for non-payable function", + "comment": "value sent for non-payable function", "calldata": "a7a0d537", "value": "42" }, @@ -181,7 +181,7 @@ }, { "input": { - "text-calldata": "missing fallback", + "comment": "missing fallback", "calldata": "deadc0de", "value": "0" }, @@ -193,7 +193,7 @@ }, { "input": { - "text-calldata": "non-public hidden() must not be dispatched", + "comment": "non-public hidden() must not be dispatched", "calldata": "aef6d4b1", "value": "0" }, diff --git a/test/examples/dispatch/concat.json b/test/examples/dispatch/concat.json index 98f14132c..322a6d9e1 100644 --- a/test/examples/dispatch/concat.json +++ b/test/examples/dispatch/concat.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "constructor()", + "comment": "constructor()", "calldata": "", "value": "0" }, @@ -13,7 +13,7 @@ }, { "input": { - "text-calldata": "concat_b32_b32(bytes32,bytes32) -> (bytes)", + "comment": "concat_b32_b32(bytes32,bytes32) -> (bytes)", "calldata": "edfc70fd11111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222", "value": "0" }, @@ -25,7 +25,7 @@ }, { "input": { - "text-calldata": "concat_b32_bytes(bytes32,bytes) -> (bytes) with 0xaa..aa and 0xdeadbeef", + "comment": "concat_b32_bytes(bytes32,bytes) -> (bytes) with 0xaa..aa and 0xdeadbeef", "calldata": "6a43d85aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -37,7 +37,7 @@ }, { "input": { - "text-calldata": "concat_b32_bytes(bytes32,bytes) -> (bytes) with 0xaa..aa and 33 bytes of 0xdd", + "comment": "concat_b32_bytes(bytes32,bytes) -> (bytes) with 0xaa..aa and 33 bytes of 0xdd", "calldata": "6a43d85aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000021dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd00000000000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -49,7 +49,7 @@ }, { "input": { - "text-calldata": "concat_b32_bytes(bytes32,bytes) -> (bytes) with 0xaa..aa and 64 bytes of 0xee", + "comment": "concat_b32_bytes(bytes32,bytes) -> (bytes) with 0xaa..aa and 64 bytes of 0xee", "calldata": "6a43d85aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "value": "0" }, @@ -61,7 +61,7 @@ }, { "input": { - "text-calldata": "concat_bytes_bytes(bytes,bytes) -> (bytes) with 0xdeadbeef and 0xcafebabe", + "comment": "concat_bytes_bytes(bytes,bytes) -> (bytes) with 0xdeadbeef and 0xcafebabe", "calldata": "3ccf57db000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000004deadbeef000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004cafebabe00000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -73,7 +73,7 @@ }, { "input": { - "text-calldata": "concat_bytes_bytes(bytes,bytes) -> (bytes) with 33 bytes of 0x11 and 64 bytes of 0x22", + "comment": "concat_bytes_bytes(bytes,bytes) -> (bytes) with 33 bytes of 0x11 and 64 bytes of 0x22", "calldata": "3ccf57db000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004022222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222", "value": "0" }, @@ -85,7 +85,7 @@ }, { "input": { - "text-calldata": "to_bytes_b32(bytes32) -> (bytes) with 0xcc..cc", + "comment": "to_bytes_b32(bytes32) -> (bytes) with 0xcc..cc", "calldata": "1b08db15cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "value": "0" }, @@ -97,7 +97,7 @@ }, { "input": { - "text-calldata": "to_bytes_bytes(bytes) -> (bytes) with 0xdeadbeef", + "comment": "to_bytes_bytes(bytes) -> (bytes) with 0xdeadbeef", "calldata": "6be8c51100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -109,7 +109,7 @@ }, { "input": { - "text-calldata": "to_bytes_bytes(bytes) -> (bytes) with 32 bytes of 0x33", + "comment": "to_bytes_bytes(bytes) -> (bytes) with 32 bytes of 0x33", "calldata": "6be8c511000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000203333333333333333333333333333333333333333333333333333333333333333", "value": "0" }, @@ -121,7 +121,7 @@ }, { "input": { - "text-calldata": "to_bytes_bytes(bytes) -> (bytes) with 33 bytes of 0x11", + "comment": "to_bytes_bytes(bytes) -> (bytes) with 33 bytes of 0x11", "calldata": "6be8c5110000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -133,7 +133,7 @@ }, { "input": { - "text-calldata": "to_bytes_bytes(bytes) -> (bytes) with 64 bytes of 0x22", + "comment": "to_bytes_bytes(bytes) -> (bytes) with 64 bytes of 0x22", "calldata": "6be8c5110000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004022222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222", "value": "0" }, @@ -145,7 +145,7 @@ }, { "input": { - "text-calldata": "empty_area(uint256) -> (bytes) with n=8", + "comment": "empty_area(uint256) -> (bytes) with n=8", "calldata": "5defe8dc0000000000000000000000000000000000000000000000000000000000000008", "value": "0" }, @@ -157,7 +157,7 @@ }, { "input": { - "text-calldata": "empty_area(uint256) -> (bytes) with n=0", + "comment": "empty_area(uint256) -> (bytes) with n=0", "calldata": "5defe8dc0000000000000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -169,7 +169,7 @@ }, { "input": { - "text-calldata": "concat_b32_empty(bytes32,uint256) -> (bytes) with 0xbb..bb and n=16", + "comment": "concat_b32_empty(bytes32,uint256) -> (bytes) with 0xbb..bb and n=16", "calldata": "002a099abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0000000000000000000000000000000000000000000000000000000000000010", "value": "0" }, @@ -181,7 +181,7 @@ }, { "input": { - "text-calldata": "concat_b32_empty(bytes32,uint256) -> (bytes) with 0xbb..bb and n=1", + "comment": "concat_b32_empty(bytes32,uint256) -> (bytes) with 0xbb..bb and n=1", "calldata": "002a099abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0000000000000000000000000000000000000000000000000000000000000001", "value": "0" }, @@ -193,7 +193,7 @@ }, { "input": { - "text-calldata": "concat_b32_empty(bytes32,uint256) -> (bytes) with 0xbb..bb and n=32", + "comment": "concat_b32_empty(bytes32,uint256) -> (bytes) with 0xbb..bb and n=32", "calldata": "002a099abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0000000000000000000000000000000000000000000000000000000000000020", "value": "0" }, @@ -205,7 +205,7 @@ }, { "input": { - "text-calldata": "concat_b32_empty(bytes32,uint256) -> (bytes) with 0xbb..bb and n=33", + "comment": "concat_b32_empty(bytes32,uint256) -> (bytes) with 0xbb..bb and n=33", "calldata": "002a099abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0000000000000000000000000000000000000000000000000000000000000021", "value": "0" }, @@ -217,7 +217,7 @@ }, { "input": { - "text-calldata": "concat_b32_empty(bytes32,uint256) -> (bytes) with 0xbb..bb and n=64", + "comment": "concat_b32_empty(bytes32,uint256) -> (bytes) with 0xbb..bb and n=64", "calldata": "002a099abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0000000000000000000000000000000000000000000000000000000000000040", "value": "0" }, @@ -229,7 +229,7 @@ }, { "input": { - "text-calldata": "concat_nested_b32(bytes32,bytes32,bytes32) -> (bytes) with 0x11.., 0x22.., 0x33..", + "comment": "concat_nested_b32(bytes32,bytes32,bytes32) -> (bytes) with 0x11.., 0x22.., 0x33..", "calldata": "fb6e9fc2111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222223333333333333333333333333333333333333333333333333333333333333333", "value": "0" }, @@ -241,7 +241,7 @@ }, { "input": { - "text-calldata": "concat_nested_empty(bytes32,uint256,bytes32) -> (bytes) with 0x11.., n=8, 0x33..", + "comment": "concat_nested_empty(bytes32,uint256,bytes32) -> (bytes) with 0x11.., n=8, 0x33..", "calldata": "dc7e53eb111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000083333333333333333333333333333333333333333333333333333333333333333", "value": "0" }, diff --git a/test/examples/dispatch/ecrecover.json b/test/examples/dispatch/ecrecover.json index 196be387a..bd123122b 100644 --- a/test/examples/dispatch/ecrecover.json +++ b/test/examples/dispatch/ecrecover.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "constructor()", + "comment": "constructor()", "calldata": "", "value": "0" }, @@ -13,7 +13,7 @@ }, { "input": { - "text-calldata": "recover()(address)", + "comment": "recover()(address)", "calldata": "ce746024", "value": "0" }, diff --git a/test/examples/dispatch/fallback.json b/test/examples/dispatch/fallback.json index c96b5a260..1eece7cb8 100644 --- a/test/examples/dispatch/fallback.json +++ b/test/examples/dispatch/fallback.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "constructor()", + "comment": "constructor()", "calldata": "", "value": "0" }, @@ -13,7 +13,7 @@ }, { "input": { - "text-calldata": "answer()(uint256)", + "comment": "answer()(uint256)", "calldata": "85bb7d69", "value": "0" }, @@ -25,7 +25,7 @@ }, { "input": { - "text-calldata": "no selector -- user-defined fallback runs and reverts", + "comment": "no selector -- user-defined fallback runs and reverts", "calldata": "", "value": "0" }, @@ -37,7 +37,7 @@ }, { "input": { - "text-calldata": "unknown selector -- user-defined fallback runs and reverts", + "comment": "unknown selector -- user-defined fallback runs and reverts", "calldata": "deadc0de", "value": "0" }, @@ -49,7 +49,7 @@ }, { "input": { - "text-calldata": "unknown selector with value -- payable fallback runs and reverts", + "comment": "unknown selector with value -- payable fallback runs and reverts", "calldata": "deadc0de", "value": "42" }, diff --git a/test/examples/dispatch/hashes.json b/test/examples/dispatch/hashes.json index be141fd34..01f31483a 100644 --- a/test/examples/dispatch/hashes.json +++ b/test/examples/dispatch/hashes.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "constructor()", + "comment": "constructor()", "calldata": "", "value": "0" }, @@ -13,7 +13,7 @@ }, { "input": { - "text-calldata": "keccak()(bytes32)", + "comment": "keccak()(bytes32)", "calldata": "775dec49", "value": "0" }, @@ -25,7 +25,7 @@ }, { "input": { - "text-calldata": "sha()(bytes32)", + "comment": "sha()(bytes32)", "calldata": "65707d6f", "value": "0" }, @@ -37,7 +37,7 @@ }, { "input": { - "text-calldata": "ripemd()(bytes32)", + "comment": "ripemd()(bytes32)", "calldata": "a1e754ea", "value": "0" }, diff --git a/test/examples/dispatch/memory.json b/test/examples/dispatch/memory.json index ca7d4235b..155358802 100644 --- a/test/examples/dispatch/memory.json +++ b/test/examples/dispatch/memory.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "constructor()", + "comment": "constructor()", "calldata": "", "value": "0" }, @@ -13,7 +13,7 @@ }, { "input": { - "text-calldata": "dirty_allocate() -> (bytes)", + "comment": "dirty_allocate() -> (bytes)", "calldata": "9abc6cd9", "value": "0" }, @@ -25,7 +25,7 @@ }, { "input": { - "text-calldata": "clear_allocate() -> (bytes)", + "comment": "clear_allocate() -> (bytes)", "calldata": "a33a0cf7", "value": "0" }, diff --git a/test/examples/dispatch/miniERC20.json b/test/examples/dispatch/miniERC20.json index f6daa686f..2e8029949 100644 --- a/test/examples/dispatch/miniERC20.json +++ b/test/examples/dispatch/miniERC20.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "'constructor(string,string,uint)' Argot ARG 1000", + "comment": "'constructor(string,string,uint)' Argot ARG 1000", "calldata": "000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000054172676f7400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034152470000000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -13,7 +13,7 @@ }, { "input": { - "text-calldata": "transfer(address,uint)(bool) $ANVIL1 958", + "comment": "transfer(address,uint)(bool) $ANVIL1 958", "calldata": "a9059cbb00000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c800000000000000000000000000000000000000000000000000000000000003be", "value": "0" }, @@ -25,7 +25,7 @@ }, { "input": { - "text-calldata": "getMyBalance()", + "comment": "getMyBalance()", "calldata": "0x4c738909", "value": "0" }, diff --git a/test/examples/dispatch/neg.json b/test/examples/dispatch/neg.json index c116f9eb7..0263f53bc 100644 --- a/test/examples/dispatch/neg.json +++ b/test/examples/dispatch/neg.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "constructor()", + "comment": "constructor()", "calldata": "", "value": "0" }, @@ -13,7 +13,7 @@ }, { "input": { - "text-calldata": "negPair()", + "comment": "negPair()", "calldata": "ce61a134", "value": "0" }, diff --git a/test/examples/dispatch/nonpayable_ctor.json b/test/examples/dispatch/nonpayable_ctor.json index 6a046aea3..ae1249939 100644 --- a/test/examples/dispatch/nonpayable_ctor.json +++ b/test/examples/dispatch/nonpayable_ctor.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "non-payable constructor rejects incoming value", + "comment": "non-payable constructor rejects incoming value", "calldata": "", "value": "42" }, diff --git a/test/examples/dispatch/ownable.json b/test/examples/dispatch/ownable.json index 8bf75e2db..b710d7f12 100644 --- a/test/examples/dispatch/ownable.json +++ b/test/examples/dispatch/ownable.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "constructor()", + "comment": "constructor()", "calldata": "", "value": "0" }, @@ -13,7 +13,7 @@ }, { "input": { - "text-calldata": "getOwner()(address) - should return deployer address", + "comment": "getOwner()(address) - should return deployer address", "calldata": "893d20e8", "value": "0" }, @@ -25,7 +25,7 @@ }, { "input": { - "text-calldata": "changeOwner(address) to 0xdead - should succeed from owner", + "comment": "changeOwner(address) to 0xdead - should succeed from owner", "calldata": "a6f9dae1000000000000000000000000000000000000000000000000000000000000dead", "value": "0" }, @@ -37,7 +37,7 @@ }, { "input": { - "text-calldata": "getOwner()(address) - should now return 0xdead", + "comment": "getOwner()(address) - should now return 0xdead", "calldata": "893d20e8", "value": "0" }, @@ -49,7 +49,7 @@ }, { "input": { - "text-calldata": "changeOwner(address) - should fail, caller is no longer owner", + "comment": "changeOwner(address) - should fail, caller is no longer owner", "calldata": "a6f9dae1000000000000000000000000000000000000000000000000000000000000beef", "value": "0" }, diff --git a/test/examples/dispatch/payable.json b/test/examples/dispatch/payable.json index 61379398e..703dfe1f8 100644 --- a/test/examples/dispatch/payable.json +++ b/test/examples/dispatch/payable.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "non-payable constructor accepts zero value", + "comment": "non-payable constructor accepts zero value", "calldata": "", "value": "0" }, @@ -16,7 +16,7 @@ }, { "input": { - "text-calldata": "deposit()(uint256)", + "comment": "deposit()(uint256)", "calldata": "d0e30db0", "value": "42" }, @@ -28,7 +28,7 @@ }, { "input": { - "text-calldata": "deposit()(uint256)", + "comment": "deposit()(uint256)", "calldata": "d0e30db0", "value": "0" }, @@ -40,7 +40,7 @@ }, { "input": { - "text-calldata": "balance()(uint256)", + "comment": "balance()(uint256)", "calldata": "b69ef8a8", "value": "0" }, @@ -52,7 +52,7 @@ }, { "input": { - "text-calldata": "balance()(uint256)", + "comment": "balance()(uint256)", "calldata": "b69ef8a8", "value": "42" }, @@ -64,7 +64,7 @@ }, { "input": { - "text-calldata": "fallback with value", + "comment": "fallback with value", "calldata": "deadc0de", "value": "42" }, @@ -76,7 +76,7 @@ }, { "input": { - "text-calldata": "fallback without value should fail", + "comment": "fallback without value should fail", "calldata": "deadc0de", "value": "0" }, @@ -88,7 +88,7 @@ }, { "input": { - "text-calldata": "balance()(uint256)", + "comment": "balance()(uint256)", "calldata": "b69ef8a8", "value": "0" }, diff --git a/test/examples/dispatch/payable_ctor.json b/test/examples/dispatch/payable_ctor.json index 883d560f6..05293f8fd 100644 --- a/test/examples/dispatch/payable_ctor.json +++ b/test/examples/dispatch/payable_ctor.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "payable constructor accepts value", + "comment": "payable constructor accepts value", "calldata": "", "value": "42" }, @@ -16,7 +16,7 @@ }, { "input": { - "text-calldata": "balance()(uint256) -- value sent at deploy was retained", + "comment": "balance()(uint256) -- value sent at deploy was retained", "calldata": "b69ef8a8", "value": "0" }, diff --git a/test/examples/dispatch/slices.json b/test/examples/dispatch/slices.json index ae5e34599..7eb707709 100644 --- a/test/examples/dispatch/slices.json +++ b/test/examples/dispatch/slices.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "constructor()", + "comment": "constructor()", "calldata": "", "value": "0" }, @@ -13,7 +13,7 @@ }, { "input": { - "text-calldata": "slice_bytes: drop 4 of deadbeefcafebabe -> cafebabe", + "comment": "slice_bytes: drop 4 of deadbeefcafebabe -> cafebabe", "calldata": "3b613aed000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008deadbeefcafebabe000000000000000000000000000000000000000000000000", "value": "0" }, @@ -25,7 +25,7 @@ }, { "input": { - "text-calldata": "slice_bytes: drop 1 of 33x11 -> 32x11 (crosses word)", + "comment": "slice_bytes: drop 1 of 33x11 -> 32x11 (crosses word)", "calldata": "3b613aed00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -37,7 +37,7 @@ }, { "input": { - "text-calldata": "slice_bytes: start=0 identity", + "comment": "slice_bytes: start=0 identity", "calldata": "3b613aed000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -49,7 +49,7 @@ }, { "input": { - "text-calldata": "slice_bytes: start=len -> empty", + "comment": "slice_bytes: start=len -> empty", "calldata": "3b613aed000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -61,7 +61,7 @@ }, { "input": { - "text-calldata": "slice_bytes: start>len reverts OutOfBounds", + "comment": "slice_bytes: start>len reverts OutOfBounds", "calldata": "3b613aed000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -73,7 +73,7 @@ }, { "input": { - "text-calldata": "truncate_bytes: keep 4 of deadbeefcafebabe -> deadbeef", + "comment": "truncate_bytes: keep 4 of deadbeefcafebabe -> deadbeef", "calldata": "3fa275ea000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008deadbeefcafebabe000000000000000000000000000000000000000000000000", "value": "0" }, @@ -85,7 +85,7 @@ }, { "input": { - "text-calldata": "truncate_bytes: keep 33 of 64x22", + "comment": "truncate_bytes: keep 33 of 64x22", "calldata": "3fa275ea00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000021000000000000000000000000000000000000000000000000000000000000004022222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222", "value": "0" }, @@ -97,7 +97,7 @@ }, { "input": { - "text-calldata": "truncate_bytes: end=len identity", + "comment": "truncate_bytes: end=len identity", "calldata": "3fa275ea000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -109,7 +109,7 @@ }, { "input": { - "text-calldata": "truncate_bytes: end=0 -> empty", + "comment": "truncate_bytes: end=0 -> empty", "calldata": "3fa275ea000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -121,7 +121,7 @@ }, { "input": { - "text-calldata": "truncate_bytes: end>len reverts OutOfBounds", + "comment": "truncate_bytes: end>len reverts OutOfBounds", "calldata": "3fa275ea000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -133,7 +133,7 @@ }, { "input": { - "text-calldata": "slice_of_concat: drop first word -> 32x22", + "comment": "slice_of_concat: drop first word -> 32x22", "calldata": "dabdb8e2111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222220000000000000000000000000000000000000000000000000000000000000020", "value": "0" }, @@ -145,7 +145,7 @@ }, { "input": { - "text-calldata": "slice_of_concat: drop 16 -> 16x11 ++ 32x22", + "comment": "slice_of_concat: drop 16 -> 16x11 ++ 32x22", "calldata": "dabdb8e2111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222220000000000000000000000000000000000000000000000000000000000000010", "value": "0" }, @@ -157,7 +157,7 @@ }, { "input": { - "text-calldata": "slice_of_concat: start=0 identity (64B)", + "comment": "slice_of_concat: start=0 identity (64B)", "calldata": "dabdb8e2111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222220000000000000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -169,7 +169,7 @@ }, { "input": { - "text-calldata": "truncate_of_concat: keep first word -> 32x11", + "comment": "truncate_of_concat: keep first word -> 32x11", "calldata": "b785ff09111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222220000000000000000000000000000000000000000000000000000000000000020", "value": "0" }, @@ -181,7 +181,7 @@ }, { "input": { - "text-calldata": "truncate_of_concat: keep 48 -> 32x11 ++ 16x22", + "comment": "truncate_of_concat: keep 48 -> 32x11 ++ 16x22", "calldata": "b785ff09111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222220000000000000000000000000000000000000000000000000000000000000030", "value": "0" }, @@ -193,7 +193,7 @@ }, { "input": { - "text-calldata": "truncate_of_concat: end=len identity", + "comment": "truncate_of_concat: end=len identity", "calldata": "b785ff09111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222220000000000000000000000000000000000000000000000000000000000000040", "value": "0" }, @@ -205,7 +205,7 @@ }, { "input": { - "text-calldata": "window_of_concat: [16:48] straddles word -> 16x11 ++ 16x22", + "comment": "window_of_concat: [16:48] straddles word -> 16x11 ++ 16x22", "calldata": "35a3368f1111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020", "value": "0" }, @@ -217,7 +217,7 @@ }, { "input": { - "text-calldata": "window_of_concat: [24:40] sub-word -> 8x11 ++ 8x22", + "comment": "window_of_concat: [24:40] sub-word -> 8x11 ++ 8x22", "calldata": "35a3368f1111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000010", "value": "0" }, @@ -229,7 +229,7 @@ }, { "input": { - "text-calldata": "window_of_concat: full identity 64B", + "comment": "window_of_concat: full identity 64B", "calldata": "35a3368f1111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040", "value": "0" }, @@ -241,7 +241,7 @@ }, { "input": { - "text-calldata": "window_of_concat: empty window", + "comment": "window_of_concat: empty window", "calldata": "35a3368f1111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -253,7 +253,7 @@ }, { "input": { - "text-calldata": "window_of_concat: end>remaining(24) reverts", + "comment": "window_of_concat: end>remaining(24) reverts", "calldata": "35a3368f1111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000020", "value": "0" }, @@ -265,7 +265,7 @@ }, { "input": { - "text-calldata": "concat_slice_b32: cafebabe ++ 32x33", + "comment": "concat_slice_b32: cafebabe ++ 32x33", "calldata": "37dc96340000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000433333333333333333333333333333333333333333333333333333333333333330000000000000000000000000000000000000000000000000000000000000008deadbeefcafebabe000000000000000000000000000000000000000000000000", "value": "0" }, @@ -277,7 +277,7 @@ }, { "input": { - "text-calldata": "concat_slice_b32: 32xaa ++ 32x33", + "comment": "concat_slice_b32: 32xaa ++ 32x33", "calldata": "37dc96340000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000033333333333333333333333333333333333333333333333333333333333333330000000000000000000000000000000000000000000000000000000000000020aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "value": "0" }, @@ -289,7 +289,7 @@ }, { "input": { - "text-calldata": "concat_two_slices: cafebabe ++ 00112233", + "comment": "concat_two_slices: cafebabe ++ 00112233", "calldata": "5ff7af890000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008deadbeefcafebabe00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080011223344556677000000000000000000000000000000000000000000000000", "value": "0" }, @@ -301,7 +301,7 @@ }, { "input": { - "text-calldata": "concat_two_slices: 32x11 ++ 33x22 (65B)", + "comment": "concat_two_slices: 32x11 ++ 33x22 (65B)", "calldata": "5ff7af890000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000021000000000000000000000000000000000000000000000000000000000000002111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004022222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222", "value": "0" }, @@ -313,7 +313,7 @@ }, { "input": { - "text-calldata": "slice_of_slice: 0..15 drop 4 then 4 -> 08..0f", + "comment": "slice_of_slice: 0..15 drop 4 then 4 -> 08..0f", "calldata": "ca2704250000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000102030405060708090a0b0c0d0e0f00000000000000000000000000000000", "value": "0" }, @@ -325,7 +325,7 @@ }, { "input": { - "text-calldata": "slice_of_slice: 33x11 drop 1 then 0 -> 32x11", + "comment": "slice_of_slice: 33x11 drop 1 then 0 -> 32x11", "calldata": "ca270425000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -337,7 +337,7 @@ }, { "input": { - "text-calldata": "keccak_slice: drop 3 of 000000abc -> keccak(\"abc\")", + "comment": "keccak_slice: drop 3 of 000000abc -> keccak(\"abc\")", "calldata": "35c4751b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000060000006162630000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -349,7 +349,7 @@ }, { "input": { - "text-calldata": "keccak_slice: start=0 -> keccak(\"abc\")", + "comment": "keccak_slice: start=0 -> keccak(\"abc\")", "calldata": "35c4751b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036162630000000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -361,7 +361,7 @@ }, { "input": { - "text-calldata": "keccak_slice: start=len -> keccak(\"\")", + "comment": "keccak_slice: start=len -> keccak(\"\")", "calldata": "35c4751b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000036162630000000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -373,7 +373,7 @@ }, { "input": { - "text-calldata": "sha_truncate: keep 3 of abcffffff -> sha256(\"abc\")", + "comment": "sha_truncate: keep 3 of abcffffff -> sha256(\"abc\")", "calldata": "ef6356a6000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000006616263ffffff0000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -385,7 +385,7 @@ }, { "input": { - "text-calldata": "sha_truncate: end=0 -> sha256(\"\")", + "comment": "sha_truncate: end=0 -> sha256(\"\")", "calldata": "ef6356a60000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036162630000000000000000000000000000000000000000000000000000000000", "value": "0" }, @@ -397,7 +397,7 @@ }, { "input": { - "text-calldata": "keccak_window_concat: window [0:3] of \"abc\"-word||b -> keccak(\"abc\")", + "comment": "keccak_window_concat: window [0:3] of \"abc\"-word||b -> keccak(\"abc\")", "calldata": "061f505a6162630000000000000000000000000000000000000000000000000000000000222222222222222222222222222222222222222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003", "value": "0" }, @@ -409,7 +409,7 @@ }, { "input": { - "text-calldata": "keccak_window_concat: window [30:34] straddles concat -> keccak(0x11112222)", + "comment": "keccak_window_concat: window [30:34] straddles concat -> keccak(0x11112222)", "calldata": "061f505a11111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000004", "value": "0" }, diff --git a/test/examples/dispatch/template.json b/test/examples/dispatch/template.json index b1ecbb477..d4f42deed 100644 --- a/test/examples/dispatch/template.json +++ b/test/examples/dispatch/template.json @@ -5,7 +5,7 @@ "tests": [ { "input": { - "text-calldata": "constructor()", + "comment": "constructor()", "calldata": "", "value": "0" }, @@ -13,7 +13,7 @@ }, { "input": { - "text-calldata": "26121ff0", + "comment": "26121ff0", "calldata": "26121ff0", "value": "0" }, diff --git a/test/testrunner/testrunner.cpp b/test/testrunner/testrunner.cpp index 6bd1adf0a..5c2c8565b 100644 --- a/test/testrunner/testrunner.cpp +++ b/test/testrunner/testrunner.cpp @@ -98,11 +98,11 @@ int main(int argc, char** argv) auto kind = test["kind"].get(); // Human-readable description of the call, shown when the test fails. - std::string const textCalldata = test["input"].value("text-calldata", std::string{}); + std::string const comment = test["input"].value("comment", std::string{}); auto reportFailure = [&](std::string const& _reason) { std::cerr << _reason; - if (!textCalldata.empty()) - std::cerr << " (text-calldata: " << textCalldata << ")"; + if (!comment.empty()) + std::cerr << " (comment: " << comment << ")"; std::cerr << std::endl; }; if (kind == "constructor") From 9174fc7934b4f8ba64b992a7f0875cc5d35cdefa Mon Sep 17 00:00:00 2001 From: Marcin Benke Date: Fri, 19 Jun 2026 09:53:36 +0200 Subject: [PATCH 3/3] change remaining text-calldata to comment --- test/examples/dispatch/ecrecover.json | 2 +- test/examples/dispatch/generic_product.json | 6 +++--- test/examples/dispatch/generic_sum.json | 10 +++++----- test/examples/dispatch/template.json | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/examples/dispatch/ecrecover.json b/test/examples/dispatch/ecrecover.json index 3d7eaf41f..b0df3f2c0 100644 --- a/test/examples/dispatch/ecrecover.json +++ b/test/examples/dispatch/ecrecover.json @@ -25,7 +25,7 @@ }, { "input": { - "text-calldata": "recoverFail()(address)", + "comment": "recoverFail()(address)", "calldata": "75ebe7ac", "value": "0" }, diff --git a/test/examples/dispatch/generic_product.json b/test/examples/dispatch/generic_product.json index b1cb49c48..9eba976e0 100644 --- a/test/examples/dispatch/generic_product.json +++ b/test/examples/dispatch/generic_product.json @@ -12,7 +12,7 @@ }, { "input": { - "text-calldata": "encodeX(3, 7) -> 3", + "comment": "encodeX(3, 7) -> 3", "calldata": "0x0dbc6e9b00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000007", "value": "0" }, @@ -24,7 +24,7 @@ }, { "input": { - "text-calldata": "encodeY(3, 7) -> 7", + "comment": "encodeY(3, 7) -> 7", "calldata": "0xe9c28f9600000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000007", "value": "0" }, @@ -36,7 +36,7 @@ }, { "input": { - "text-calldata": "decodeX(10, 20) -> 10", + "comment": "decodeX(10, 20) -> 10", "calldata": "0x0e3fc16f000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000014", "value": "0" }, diff --git a/test/examples/dispatch/generic_sum.json b/test/examples/dispatch/generic_sum.json index acd99ecae..fcf51aa80 100644 --- a/test/examples/dispatch/generic_sum.json +++ b/test/examples/dispatch/generic_sum.json @@ -12,7 +12,7 @@ }, { "input": { - "text-calldata": "encodeNone() -> 0", + "comment": "encodeNone() -> 0", "calldata": "cc5ae1e8", "value": "0" }, @@ -24,7 +24,7 @@ }, { "input": { - "text-calldata": "encodeSomeTag(42) -> 1", + "comment": "encodeSomeTag(42) -> 1", "calldata": "0xef5d5c21000000000000000000000000000000000000000000000000000000000000002a", "value": "0" }, @@ -36,7 +36,7 @@ }, { "input": { - "text-calldata": "encodePayload(99) -> 99", + "comment": "encodePayload(99) -> 99", "calldata": "0x342242e80000000000000000000000000000000000000000000000000000000000000063", "value": "0" }, @@ -48,7 +48,7 @@ }, { "input": { - "text-calldata": "decodeAndGet(tag=1, value=77) -> 77", + "comment": "decodeAndGet(tag=1, value=77) -> 77", "calldata": "0xc222f3f50000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004d", "value": "0" }, @@ -60,7 +60,7 @@ }, { "input": { - "text-calldata": "decodeAndGet(tag=0, value=0) -> 0 (None)", + "comment": "decodeAndGet(tag=0, value=0) -> 0 (None)", "calldata": "0xc222f3f500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "value": "0" }, diff --git a/test/examples/dispatch/template.json b/test/examples/dispatch/template.json index d4f42deed..23a74e1b8 100644 --- a/test/examples/dispatch/template.json +++ b/test/examples/dispatch/template.json @@ -13,7 +13,7 @@ }, { "input": { - "comment": "26121ff0", + "comment": "f()", "calldata": "26121ff0", "value": "0" },