Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion integration_tests/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ fn test_log_past_capacity() -> Result<()> {
.map_err(|e| anyhow::anyhow!("Failed to prepare example: {e}"))?;
let (_, logs, fuel) = run_example("log-past-capacity", vec![])?;
assert_eq!(logs, format!("{}{}", "a".repeat(991), "b".repeat(10)));
assert_fuel_consumed_within_threshold(928, fuel);
assert_fuel_consumed_within_threshold(965, fuel);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea why the fuel consumed changed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is a change in the latest Rust version, see #186 which has the same test failure, which I would also expect on main

Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion trampoline/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ assert_cmd = "2.2.0"
predicates = "3.1.4"
wat = "1.245.1"
wasmprinter = "0.246.2"
insta = { version = "1.47", features = ["glob"] }
insta = { version = "1.47", features = ["filters", "glob"] }
15 changes: 11 additions & 4 deletions trampoline/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,17 @@ mod test {
//
// to update the snapshots, either run `cargo insta review` or use the `INSTA_UPDATE`
// environment variable as documented at https://docs.rs/insta/latest/insta/index.html#updating-snapshots
insta::glob!("test_data/*.wat", |path| {
let input = wat::parse_file(path).unwrap();
let actual = trampoline_wat(&input).unwrap();
insta::assert_snapshot!(actual);
insta::with_settings!({
filters => vec![(
r#"\(processed-by "walrus" "[^"]+"\)"#,
r#"(processed-by "walrus" "[WALRUS-VERSION]")"#,
)],
}, {
insta::glob!("test_data/*.wat", |path| {
let input = wat::parse_file(path).unwrap();
let actual = trampoline_wat(&input).unwrap();
insta::assert_snapshot!(actual);
});
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,6 @@ input_file: trampoline/src/test_data/consumer.wat
call 16
)
(@producers
(processed-by "walrus" "0.26.0")
(processed-by "walrus" "[WALRUS-VERSION]")
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ input_file: trampoline/src/test_data/empty.wat
---
(module
(@producers
(processed-by "walrus" "0.26.0")
(processed-by "walrus" "[WALRUS-VERSION]")
)
)
Loading