Skip to content

Commit c700851

Browse files
github-actions[bot]DaniPopesgrandizzy
authored
chore(tests): bump forge-std version (#10406)
* chore: bump forge-std version used for tests * fix tests - additional file in forge-std * Fix precompile label test --------- Co-authored-by: DaniPopes <[email protected]> Co-authored-by: grandizzy <[email protected]> Co-authored-by: grandizzy <[email protected]>
1 parent d5860bd commit c700851

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

crates/forge/tests/cli/script.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,7 +1952,7 @@ contract SimpleScript is Script {
19521952
])
19531953
.assert_success()
19541954
.stdout_eq(str![[r#"
1955-
{"logs":[],"returns":{"success":{"internal_type":"bool","value":"true"}},"success":true,"raw_logs":[],"traces":[["Deployment",{"arena":[{"parent":null,"children":[],"idx":0,"trace":{"depth":0,"success":true,"caller":"0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"[..]","output":"[..]","gas_used":"{...}","gas_limit":"{...}","status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]}]}],["Execution",{"arena":[{"parent":null,"children":[1,2],"idx":0,"trace":{"depth":0,"success":true,"caller":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc0406226","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":"{...}","gas_limit":1073720760,"status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[{"Call":0},{"Call":1}]},{"parent":0,"children":[],"idx":1,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x7fb5297f","output":"0x","gas_used":"{...}","gas_limit":1056940994,"status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":2,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x0000000000000000000000000000000000000000","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x","output":"0x","gas_used":"{...}","gas_limit":1056940645,"status":"Stop","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]}]}]],"gas_used":"{...}","labeled_addresses":{},"returned":"0x0000000000000000000000000000000000000000000000000000000000000001","address":null}
1955+
{"logs":[],"returns":{"success":{"internal_type":"bool","value":"true"}},"success":true,"raw_logs":[],"traces":[["Deployment",{"arena":[{"parent":null,"children":[],"idx":0,"trace":{"depth":0,"success":true,"caller":"0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"[..]","output":"[..]","gas_used":"{...}","gas_limit":"{...}","status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]}]}],["Execution",{"arena":[{"parent":null,"children":[1,2],"idx":0,"trace":{"depth":0,"success":true,"caller":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc0406226","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":"{...}","gas_limit":1073720760,"status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[{"Call":0},{"Call":1}]},{"parent":0,"children":[],"idx":1,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x7fb5297f","output":"0x","gas_used":"{...}","gas_limit":1056940999,"status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":2,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x0000000000000000000000000000000000000000","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x","output":"0x","gas_used":"{...}","gas_limit":1056940650,"status":"Stop","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]}]}]],"gas_used":"{...}","labeled_addresses":{},"returned":"0x0000000000000000000000000000000000000000000000000000000000000001","address":null}
19561956
{"chain":31337,"estimated_gas_price":"{...}","estimated_total_gas_used":"{...}","estimated_amount_required":"{...}","token_symbol":"ETH"}
19571957
{"chain":"anvil-hardhat","status":"success","tx_hash":"0x4f78afe915fceb282c7625a68eb350bc0bf78acb59ad893e5c62b710a37f3156","contract_address":null,"block_number":1,"gas_used":"{...}","gas_price":"{...}"}
19581958
{"status":"success","transactions":"[..]/broadcast/Foo.sol/31337/run-latest.json","sensitive":"[..]/cache/Foo.sol/31337/run-latest.json"}
@@ -2575,7 +2575,7 @@ Chain 31337
25752575
25762576
accessList []
25772577
chainId 31337
2578-
gasLimit 228247
2578+
gasLimit 228231
25792579
gasPrice
25802580
input [..]
25812581
maxFeePerBlobGas

crates/forge/tests/cli/test_cmd.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ Compiler run successful!
997997
Ran 1 test for test/Contract.t.sol:PrecompileLabelsTest
998998
[PASS] testPrecompileLabels() ([GAS])
999999
Traces:
1000-
[14048] PrecompileLabelsTest::testPrecompileLabels()
1000+
[..] PrecompileLabelsTest::testPrecompileLabels()
10011001
├─ [0] VM::deal(VM: [0x7109709ECfa91a80626fF3989D68f67F5b1DD12D], 1000000000000000000 [1e18])
10021002
│ └─ ← [Return]
10031003
├─ [0] VM::deal(console: [0x000000000000000000636F6e736F6c652e6c6f67], 1000000000000000000 [1e18])
@@ -1451,10 +1451,10 @@ contract ATest is Test {
14511451

14521452
cmd.args(["test"]).with_no_redact().assert_success().stdout_eq(str![[r#"
14531453
...
1454-
[PASS] testNormalGas() (gas: 3153)
1455-
[PASS] testWeirdGas1() (gas: 2991)
1456-
[PASS] testWeirdGas2() (gas: 3218)
1457-
[PASS] testWithAssembly() (gas: 3034)
1454+
[PASS] testNormalGas() (gas: 3148)
1455+
[PASS] testWeirdGas1() (gas: 2986)
1456+
[PASS] testWeirdGas2() (gas: 3213)
1457+
[PASS] testWithAssembly() (gas: 3029)
14581458
...
14591459
"#]]);
14601460
});
@@ -1547,9 +1547,9 @@ Traces:
15471547
│ └─ ← [Stop]
15481548
└─ ← [Stop]
15491549
1550-
[PASS] test_GasMeter() (gas: 53102)
1550+
[PASS] test_GasMeter() (gas: 53097)
15511551
Traces:
1552-
[53102] ATest::test_GasMeter()
1552+
[53097] ATest::test_GasMeter()
15531553
├─ [0] VM::pauseGasMetering()
15541554
│ └─ ← [Return]
15551555
├─ [0] VM::resumeGasMetering()

crates/forge/tests/cli/test_optimizer.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ forgetest_init!(toggle_invalidate_cache_on_build, |prj, cmd| {
88
// All files are built with optimized tests.
99
cmd.args(["build"]).with_no_redact().assert_success().stdout_eq(str![[r#"
1010
...
11-
Compiling 22 files with [..]
11+
Compiling 23 files with [..]
1212
...
1313
1414
"#]]);
@@ -27,7 +27,7 @@ No files changed, compilation skipped
2727
// All files are rebuilt with preprocessed cache false.
2828
cmd.with_no_redact().assert_success().stdout_eq(str![[r#"
2929
...
30-
Compiling 22 files with [..]
30+
Compiling 23 files with [..]
3131
...
3232
3333
"#]]);
@@ -41,7 +41,7 @@ forgetest_init!(toggle_invalidate_cache_on_test, |prj, cmd| {
4141
// All files are built with optimized tests.
4242
cmd.args(["test"]).with_no_redact().assert_success().stdout_eq(str![[r#"
4343
...
44-
Compiling 20 files with [..]
44+
Compiling 21 files with [..]
4545
...
4646
4747
"#]]);
@@ -60,7 +60,7 @@ No files changed, compilation skipped
6060
// All files are rebuilt with preprocessed cache false.
6161
cmd.with_no_redact().assert_success().stdout_eq(str![[r#"
6262
...
63-
Compiling 20 files with [..]
63+
Compiling 21 files with [..]
6464
...
6565
6666
"#]]);
@@ -126,7 +126,7 @@ contract CounterTest is Test {
126126
// All 20 files are compiled on first run.
127127
cmd.args(["test"]).with_no_redact().assert_success().stdout_eq(str![[r#"
128128
...
129-
Compiling 20 files with [..]
129+
Compiling 21 files with [..]
130130
...
131131
132132
"#]]);
@@ -268,7 +268,7 @@ contract CounterTest is Test {
268268
// All 21 files are compiled on first run.
269269
cmd.args(["test"]).with_no_redact().assert_success().stdout_eq(str![[r#"
270270
...
271-
Compiling 21 files with [..]
271+
Compiling 22 files with [..]
272272
...
273273
274274
"#]]);
@@ -417,7 +417,7 @@ contract CounterTest is Test {
417417
// 20 files plus one mock file are compiled on first run.
418418
cmd.args(["test"]).with_no_redact().assert_success().stdout_eq(str![[r#"
419419
...
420-
Compiling 21 files with [..]
420+
Compiling 22 files with [..]
421421
...
422422
423423
"#]]);
@@ -560,7 +560,7 @@ contract CounterTest is Test {
560560
// 20 files plus one mock file are compiled on first run.
561561
cmd.args(["test"]).with_no_redact().assert_success().stdout_eq(str![[r#"
562562
...
563-
Compiling 21 files with [..]
563+
Compiling 22 files with [..]
564564
...
565565
566566
"#]]);
@@ -699,7 +699,7 @@ contract CounterTest is Test {
699699
// 20 files plus one mock file are compiled on first run.
700700
cmd.args(["test"]).with_no_redact().assert_success().stdout_eq(str![[r#"
701701
...
702-
Compiling 21 files with [..]
702+
Compiling 22 files with [..]
703703
...
704704
705705
"#]]);
@@ -874,7 +874,7 @@ contract CounterTest is Test {
874874
// 22 files plus one mock file are compiled on first run.
875875
cmd.args(["test"]).with_no_redact().assert_success().stdout_eq(str![[r#"
876876
...
877-
Compiling 23 files with [..]
877+
Compiling 24 files with [..]
878878
...
879879
[PASS] test_Increment_In_Counter() (gas: [..])
880880
[PASS] test_Increment_In_Counter_A() (gas: [..])
@@ -1091,7 +1091,7 @@ contract CounterTest is Test {
10911091

10921092
cmd.args(["test"]).with_no_redact().assert_success().stdout_eq(str![[r#"
10931093
...
1094-
Compiling 21 files with [..]
1094+
Compiling 22 files with [..]
10951095
...
10961096
[PASS] test_Increment_In_Counter() (gas: [..])
10971097
[PASS] test_Increment_In_Counter_With_Salt() (gas: [..])
@@ -1214,7 +1214,7 @@ contract CounterTest is Test {
12141214
// All 20 files are compiled on first run.
12151215
cmd.args(["test"]).with_no_redact().assert_success().stdout_eq(str![[r#"
12161216
...
1217-
Compiling 20 files with [..]
1217+
Compiling 21 files with [..]
12181218
...
12191219
12201220
"#]]);
@@ -1340,7 +1340,7 @@ contract CounterTest is Test {
13401340
// All 20 files should properly compile.
13411341
cmd.args(["test"]).with_no_redact().assert_success().stdout_eq(str![[r#"
13421342
...
1343-
Compiling 20 files with [..]
1343+
Compiling 21 files with [..]
13441344
...
13451345
13461346
"#]]);

testdata/forge-std-rev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3b20d60d14b343ee4f908cb8079495c07f5e8981
1+
77041d2ce690e692d6e03cc812b57d1ddaa4d505

0 commit comments

Comments
 (0)