pub struct TestConfig {Show 34 fields
pub bulk_memory: Option<bool>,
pub memory64: Option<bool>,
pub custom_page_sizes: Option<bool>,
pub multi_memory: Option<bool>,
pub threads: Option<bool>,
pub gc: Option<bool>,
pub function_references: Option<bool>,
pub relaxed_simd: Option<bool>,
pub reference_types: Option<bool>,
pub tail_call: Option<bool>,
pub extended_const: Option<bool>,
pub wide_arithmetic: Option<bool>,
pub compact_imports: Option<bool>,
pub hogs_memory: Option<bool>,
pub guest_debug: Option<bool>,
pub component_model_async: Option<bool>,
pub component_model_more_async_builtins: Option<bool>,
pub component_model_async_stackful: Option<bool>,
pub component_model_threading: Option<bool>,
pub component_model_error_context: Option<bool>,
pub component_model_gc: Option<bool>,
pub component_model_map: Option<bool>,
pub component_model_memory64: Option<bool>,
pub component_model_fixed_length_lists: Option<bool>,
pub component_model_implements: Option<bool>,
pub component_model_canonical_names: Option<bool>,
pub component_model_accessors: Option<bool>,
pub simd: Option<bool>,
pub exceptions: Option<bool>,
pub legacy_exceptions: Option<bool>,
pub stack_switching: Option<bool>,
pub spec_test: Option<bool>,
pub custom_descriptors: Option<bool>,
pub flags: Option<TestFlags>,
}Expand description
Per-test configuration which is written down in the test file itself
for misc_testsuite/**/*.wast or in spec_test_config above for
spec tests.
Fields§
§bulk_memory: Option<bool>§memory64: Option<bool>§custom_page_sizes: Option<bool>§multi_memory: Option<bool>§threads: Option<bool>§gc: Option<bool>§function_references: Option<bool>§relaxed_simd: Option<bool>§reference_types: Option<bool>§tail_call: Option<bool>§extended_const: Option<bool>§wide_arithmetic: Option<bool>§compact_imports: Option<bool>§hogs_memory: Option<bool>§guest_debug: Option<bool>§component_model_async: Option<bool>§component_model_more_async_builtins: Option<bool>§component_model_async_stackful: Option<bool>§component_model_threading: Option<bool>§component_model_error_context: Option<bool>§component_model_gc: Option<bool>§component_model_map: Option<bool>§component_model_memory64: Option<bool>§component_model_fixed_length_lists: Option<bool>§component_model_implements: Option<bool>§component_model_canonical_names: Option<bool>§component_model_accessors: Option<bool>§simd: Option<bool>§exceptions: Option<bool>§legacy_exceptions: Option<bool>§stack_switching: Option<bool>§spec_test: Option<bool>§custom_descriptors: Option<bool>§flags: Option<TestFlags>Mostly arbitrary Wasmtime CLI flags to configure the engine and store with.
Flags which affect wasm features, plus some major decisions like
-Ccompiler, are rejected here. This field is opaque to
should_fail calculations below, so nothing specified here can
affect that result. Hence why major decisions like -Ccompiler
are rejected as they must be representable in such a way that
should_fail can test for.
Implementations§
Source§impl TestConfig
impl TestConfig
Sourcepub fn apply(&self, opts: &mut CommonOptions) -> Result<()>
pub fn apply(&self, opts: &mut CommonOptions) -> Result<()>
Applies this test’s configuration on top of opts.
This sets the test’s WebAssembly features and then applies its own
flags, which override anything already in opts.
Returns an error if the flags set a WebAssembly feature, which must use
the boolean options of TestConfig instead, or an option that the
harness owns because it’s described by crate::wast::WastConfig: the compiler,
the target, or the pooling allocator.
Source§impl TestConfig
impl TestConfig
pub fn bulk_memory(&self) -> bool
pub fn memory64(&self) -> bool
pub fn custom_page_sizes(&self) -> bool
pub fn multi_memory(&self) -> bool
pub fn threads(&self) -> bool
pub fn gc(&self) -> bool
pub fn function_references(&self) -> bool
pub fn relaxed_simd(&self) -> bool
pub fn reference_types(&self) -> bool
pub fn tail_call(&self) -> bool
pub fn extended_const(&self) -> bool
pub fn wide_arithmetic(&self) -> bool
pub fn compact_imports(&self) -> bool
pub fn hogs_memory(&self) -> bool
pub fn guest_debug(&self) -> bool
pub fn component_model_async(&self) -> bool
pub fn component_model_more_async_builtins(&self) -> bool
pub fn component_model_async_stackful(&self) -> bool
pub fn component_model_threading(&self) -> bool
pub fn component_model_error_context(&self) -> bool
pub fn component_model_gc(&self) -> bool
pub fn component_model_map(&self) -> bool
pub fn component_model_memory64(&self) -> bool
pub fn component_model_fixed_length_lists(&self) -> bool
pub fn component_model_implements(&self) -> bool
pub fn component_model_canonical_names(&self) -> bool
pub fn component_model_accessors(&self) -> bool
pub fn simd(&self) -> bool
pub fn exceptions(&self) -> bool
pub fn legacy_exceptions(&self) -> bool
pub fn stack_switching(&self) -> bool
pub fn spec_test(&self) -> bool
pub fn custom_descriptors(&self) -> bool
Source§impl TestConfig
impl TestConfig
Trait Implementations§
Source§impl Clone for TestConfig
impl Clone for TestConfig
Source§impl Debug for TestConfig
impl Debug for TestConfig
Source§impl Default for TestConfig
impl Default for TestConfig
Source§impl<'de> Deserialize<'de> for TestConfig
impl<'de> Deserialize<'de> for TestConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for TestConfig
impl PartialEq for TestConfig
impl StructuralPartialEq for TestConfig
Auto Trait Implementations§
impl Forget for TestConfig
impl Freeze for TestConfig
impl Move for TestConfig
impl RefUnwindSafe for TestConfig
impl Send for TestConfig
impl Sync for TestConfig
impl Unpin for TestConfig
impl UnsafeUnpin for TestConfig
impl UnwindSafe for TestConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more