-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
A-testingArea: testingArea: testingA-tracingArea: tracingArea: tracingC-forgeCommand: forgeCommand: forgeCmd-forge-testCommand: forge testCommand: forge testT-bugType: bugType: bug
Description
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.2.0 (56dc746 2022-08-26T00:07:43.474069Z)
What command(s) is the bug in?
forge test
Operating System
No response
Describe the bug
Using the test contract, I am unable to view any of the console.logs for successful tests. Like fuzz tests, we should the trace of the last successful run if all runs pass.
contract NonceCounter {
uint256 public nonce = 1;
function increment() public {
nonce++;
}
}
contract Test3 is Test {
NonceCounter nonceCounter;
uint256 lastNonce;
function setUp() public {
nonceCounter = new NonceCounter();
}
function invariant_NonceGoUp() external {
console2.log('lastNonce: ', lastNonce);
uint256 currentNonce = nonceCounter.nonce();
console2.log('currentNonce: ', nonceCounter.nonce());
require(currentNonce > lastNonce, "Invariant violated: Nonce did not increase");
lastNonce = currentNonce;
}
}Metadata
Metadata
Assignees
Labels
A-testingArea: testingArea: testingA-tracingArea: tracingArea: tracingC-forgeCommand: forgeCommand: forgeCmd-forge-testCommand: forge testCommand: forge testT-bugType: bugType: bug
Type
Projects
Status
Done