Skip to content

Ethdebug isoltest framework#16675

Open
nikola-matic wants to merge 1 commit intodevelopfrom
ethdebug-isoltest-migration
Open

Ethdebug isoltest framework#16675
nikola-matic wants to merge 1 commit intodevelopfrom
ethdebug-isoltest-migration

Conversation

@nikola-matic
Copy link
Copy Markdown
Contributor

@nikola-matic nikola-matic commented May 5, 2026

Closes #16502.

Supports the following:

  • EVM version
  • optimizer on/off
  • revert strings
  • multi-source input
  • compileViaSSACFG

Allows matching of specific portions of the output JSON, length checks on arrays, type checks. I could remove some of the current CLI tests, but would prefer to keep them in for the time being - most of the CLI tests requests outputs other than ethdebug, and the new EthdebugTest isoltest only supports reading of ethdebug data directly. In addition, there's no checks for errors like in syntax tests, which automatically disqualified migration of all of the 'invalid' CLI tests.

Copy link
Copy Markdown
Member

@clonker clonker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments.

Mainly it would be good to have descriptions of the test format in the header so one doesn't have to go look through the code to find out what options there are.

Beyond that quite a few things can be const qualified I think. But that's more of a nit and not an official style guide... yet. :P

Comment thread test/libsolidity/EthdebugTest.cpp Outdated
Comment thread test/libsolidity/EthdebugTest.cpp Outdated
Comment thread test/libsolidity/EthdebugTest.cpp Outdated
Comment thread test/libsolidity/StandardJSONTest.cpp Outdated
Comment thread test/libsolidity/StandardJSONTest.cpp
Comment thread test/libsolidity/StandardJSONTest.cpp Outdated
Comment thread test/libsolidity/StandardJSONTest.cpp
Comment thread test/InteractiveTests.h
@nikola-matic nikola-matic force-pushed the ethdebug-isoltest-migration branch from 9f4aacf to bdc36c0 Compare May 7, 2026 10:16
@nikola-matic
Copy link
Copy Markdown
Contributor Author

Some minor comments.

Mainly it would be good to have descriptions of the test format in the header so one doesn't have to go look through the code to find out what options there are.

Beyond that quite a few things can be const qualified I think. But that's more of a nit and not an official style guide... yet. :P

I applied all of the suggested changes, and went full const as well in preparation for the clang-tidy PR :D
The header descriptions are claude generated, and then cut manually to contain only the important bits.

@nikola-matic nikola-matic requested a review from clonker May 7, 2026 11:26
Copy link
Copy Markdown
Member

@clonker clonker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't fix the replace thing. Try defining the following test:

contract C {
    function f() public pure {}
}
// ----
// .compilation:
// {
//     "compiler": "<VERSION>"
// }

@nikola-matic
Copy link
Copy Markdown
Contributor Author

You didn't fix the replace thing. Try defining the following test:

contract C {
    function f() public pure {}
}
// ----
// .compilation:
// {
//     "compiler": "<VERSION>"
// }

Simplified a bit since Json::type() exists :)

@clonker
Copy link
Copy Markdown
Member

clonker commented May 7, 2026

Simplified a bit since Json::type() exists :)

Sweet, TIL!

@nikola-matic nikola-matic force-pushed the ethdebug-isoltest-migration branch from 6ac8d05 to 59617b9 Compare May 7, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ethdebug testcase

2 participants