Skip to content

Commit 5908c88

Browse files
committed
Fix codegen test expectation
1 parent d6a5638 commit 5908c88

3 files changed

Lines changed: 14 additions & 9 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/test/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ log = "0.4.26"
2626
regex = "1.11.1"
2727
serde = { workspace = true }
2828
toml = "1.1.2"
29-
wasi-preview1-component-adapter-provider = "45.0.1"
29+
wasi-preview1-component-adapter-provider = "46.0.1"
3030
wac-parser = "0.10.0"
3131
wac-types = "0.10.0"
3232
wac-graph = "0.10.0"

crates/test/src/go.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,17 @@ impl LanguageMethods for Go {
3939
config: &crate::config::WitConfig,
4040
_args: &[String],
4141
) -> bool {
42-
// Async is only supported with a patched build of Go (see `prepare`
43-
// below), so expect failure when that's not the toolchain in use.
44-
config.error_context
45-
|| (name == "async-trait-function.wit" && !runner.go_async_supported())
46-
|| name == "named-fixed-length-list.wit"
47-
|| name == "issue-1598.wit"
42+
if config.error_context {
43+
return true;
44+
}
45+
if name == "named-fixed-length-list.wit" {
46+
return true;
47+
}
48+
if !runner.go_async_supported() {
49+
return name == "async-trait-function.wit" || name == "issue-1598.wit";
50+
}
51+
52+
false
4853
}
4954

5055
fn should_fail_compile(

0 commit comments

Comments
 (0)