Skip to content

Commit

Permalink
Change file name pattern for snap files (#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
cburgdorf authored Feb 28, 2023
1 parent 01aa598 commit f62afac
Show file tree
Hide file tree
Showing 30 changed files with 30 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ macro_rules! assert_harness_gas_report {

($harness: expr, $($expr:expr),*) => {
let mut settings = insta::Settings::clone_current();
settings.set_snapshot_suffix(format!("{:?}", $($expr,)*));
let suffix = format!("{:?}", $($expr,)*).replace("\"", "");
settings.set_snapshot_suffix(suffix);
let _guard = settings.bind_to_scope();
assert_snapshot!(format!("{}", $harness.gas_reporter));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 1779
expression: "format!(\"{}\", harness.gas_reporter)"
---
add([Uint(2), Uint(5)]) used 268 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 1779
expression: "format!(\"{}\", harness.gas_reporter)"
---
add_from_mem([Uint(2), Uint(5)]) used 806 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 1779
expression: "format!(\"{}\", harness.gas_reporter)"
---
add_from_sto([Uint(2), Uint(5)]) used 22616 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 1779
expression: "format!(\"{}\", harness.gas_reporter)"
---
bit_and([Uint(26), Uint(42)]) used 510 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 1779
expression: "format!(\"{}\", harness.gas_reporter)"
---
bit_or([Uint(26), Uint(42)]) used 475 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 1779
expression: "format!(\"{}\", harness.gas_reporter)"
---
bit_xor([Uint(26), Uint(42)]) used 494 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 1779
expression: "format!(\"{}\", harness.gas_reporter)"
---
div([Uint(43), Uint(5)]) used 330 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 1779
expression: "format!(\"{}\", harness.gas_reporter)"
---
lshift([Uint(1), Uint(7)]) used 431 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 1779
expression: "format!(\"{}\", harness.gas_reporter)"
---
mod([Uint(43), Uint(5)]) used 352 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 1779
expression: "format!(\"{}\", harness.gas_reporter)"
---
mul([Uint(10), Uint(42)]) used 334 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 1779
expression: "format!(\"{}\", harness.gas_reporter)"
---
pow([Uint(3), Uint(5)]) used 616 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 1779
expression: "format!(\"{}\", harness.gas_reporter)"
---
rshift([Uint(128), Uint(7)]) used 453 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 1779
expression: "format!(\"{}\", harness.gas_reporter)"
---
sub([Uint(42), Uint(26)]) used 287 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 2254
expression: "format!(\"{}\", harness.gas_reporter)"
---
run_test([]) used 35 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 2254
expression: "format!(\"{}\", harness.gas_reporter)"
---
run_test([]) used 32 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 2254
expression: "format!(\"{}\", harness.gas_reporter)"
---
run_test([]) used 32 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 2254
expression: "format!(\"{}\", harness.gas_reporter)"
---
run_test([]) used 1355 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 2254
expression: "format!(\"{}\", harness.gas_reporter)"
---
run_test([]) used 32 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 538
expression: "format!(\"{}\", harness.gas_reporter)"
---
write_bar([Uint(4), Uint(42)]) used 22486 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 538
expression: "format!(\"{}\", harness.gas_reporter)"
---
write_bar([Uint(4), Uint(42)]) used 22474 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 538
expression: "format!(\"{}\", harness.gas_reporter)"
---
write_bar([Uint(4), Uint(42)]) used 22388 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 538
expression: "format!(\"{}\", harness.gas_reporter)"
---
write_bar([Uint(4), Uint(42)]) used 22474 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 538
expression: "format!(\"{}\", harness.gas_reporter)"
---
write_bar([Uint(4), Uint(42)]) used 22486 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 538
expression: "format!(\"{}\", harness.gas_reporter)"
---
write_bar([Uint(4), Uint(42)]) used 22471 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 2160
expression: "format!(\"{}\", harness.gas_reporter)"
---
bar([Int(100)]) used 22633 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 2160
expression: "format!(\"{}\", harness.gas_reporter)"
---
bar([Int(115792089237316195423570985008687907853269984665640564039457584007913129639926)]) used 22633 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 2176
expression: "format!(\"{}\", harness.gas_reporter)"
---
i32_array([FixedArray([Int(115792089237316195423570985008687907853269984665640564039457584007913129639926), Int(100), Int(115792089237316195423570985008687907853269984665640564039457584007910982156288), Int(2147483647)])]) used 1378 gas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/tests/src/features.rs
assertion_line: 2176
expression: "format!(\"{}\", harness.gas_reporter)"
---
i8_array([FixedArray([Int(115792089237316195423570985008687907853269984665640564039457584007913129639926), Int(100), Int(115792089237316195423570985008687907853269984665640564039457584007913129639808), Int(127)])]) used 1311 gas
Expand Down

0 comments on commit f62afac

Please sign in to comment.