Skip to content

Commit

Permalink
Add Json test
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy committed Nov 8, 2024
1 parent a40b59c commit 48bde8c
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions crates/forge/tests/cli/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2897,4 +2897,54 @@ Suite result: ok. 1 passed; 0 failed; 0 skipped; [ELAPSED]
...
"#]]);

cmd.forge_fuse()
.args(["test", "--mt", "test_fallback_gas_report", "--gas-report", "--json"])
.assert_success()
.stdout_eq(
str![[r#"
[
{
"contract": "test/DelegateProxyTest.sol:DelegateProxy",
"deployment": {
"gas": 108698,
"size": 315
},
"functions": {
"deposit()": {
"calls": 1,
"min": 21160,
"mean": 21160,
"median": 21160,
"max": 21160
},
"fallback()": {
"calls": 1,
"min": 29396,
"mean": 29396,
"median": 29396,
"max": 29396
}
}
},
{
"contract": "test/DelegateProxyTest.sol:ProxiedContract",
"deployment": {
"gas": 106511,
"size": 276
},
"functions": {
"deposit(uint256)": {
"calls": 1,
"min": 3320,
"mean": 3320,
"median": 3320,
"max": 3320
}
}
}
]
"#]]
.is_json(),
);
});

0 comments on commit 48bde8c

Please sign in to comment.