Skip to content

Commit

Permalink
Fix testing cli-flags crate with component-model feature (bytecodeall…
Browse files Browse the repository at this point in the history
…iance#6831)

Not used on CI yet but it's part of an upcoming change I figured I'd
split out.
  • Loading branch information
alexcrichton authored Aug 10, 2023
1 parent e6cc402 commit c7fc5d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/cli-flags/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ default = [
"wasmtime/parallel-compilation",
]
pooling-allocator = []
component-model = []
component-model = ["wasmtime/component-model"]
12 changes: 12 additions & 0 deletions crates/cli-flags/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,8 @@ mod test {
multi_memory,
memory64,
function_references,
#[cfg(feature = "component-model")]
component_model,
} = options.wasm_features.unwrap();

assert_eq!(reference_types, Some(true));
Expand All @@ -625,6 +627,8 @@ mod test {
assert_eq!(memory64, Some(true));
assert_eq!(function_references, Some(true));
assert_eq!(relaxed_simd, Some(true));
#[cfg(feature = "component-model")]
assert_eq!(component_model, Some(true));

Ok(())
}
Expand All @@ -644,6 +648,8 @@ mod test {
multi_memory,
memory64,
function_references,
#[cfg(feature = "component-model")]
component_model,
} = options.wasm_features.unwrap();

assert_eq!(reference_types, Some(false));
Expand All @@ -656,6 +662,8 @@ mod test {
assert_eq!(memory64, Some(false));
assert_eq!(function_references, Some(false));
assert_eq!(relaxed_simd, Some(false));
#[cfg(feature = "component-model")]
assert_eq!(component_model, Some(false));

Ok(())
}
Expand All @@ -678,6 +686,8 @@ mod test {
multi_memory,
memory64,
function_references,
#[cfg(feature = "component-model")]
component_model,
} = options.wasm_features.unwrap();

assert_eq!(reference_types, Some(false));
Expand All @@ -690,6 +700,8 @@ mod test {
assert_eq!(memory64, Some(true));
assert_eq!(function_references, None);
assert_eq!(relaxed_simd, None);
#[cfg(feature = "component-model")]
assert_eq!(component_model, None);

Ok(())
}
Expand Down

0 comments on commit c7fc5d1

Please sign in to comment.