Skip to content

bug(forge test): different revertData depending on verbosity #11344

@Thomas-Smets

Description

@Thomas-Smets

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

1.3.1-stable

What version of Foundryup are you on?

0.3.1

What command(s) is the bug in?

"forge test -v" versus "forge test -vvvv"

Operating System

macOS (Apple Silicon)

Describe the bug

Issue was introduced in #10446

To reproduce:

import { Test } from "forge-std/Test.sol";

contract EOA {
    function foo() external { }
}

contract Mock {
    function callEOA(address eoa) external {
        EOA(eoa).foo();
    }
}

contract Issue is Test {
    function testIssue(address eoa) public {
        Mock mock = new Mock();
        vm.assume(eoa.code.length == 0);
        assumeNotPrecompile(eoa);

        vm.expectRevert(abi.encodePacked("call to non-contract address ", vm.toString(eoa)));
        mock.callEOA(eoa);
    }
}
Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions