Skip to main content

TestConfig

Struct TestConfig 

Source
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

Source

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

Source§

impl TestConfig

Source

pub fn options_mut( &mut self, ) -> impl Iterator<Item = (&'static str, &mut Option<bool>)>

Returns an iterator over each option.

Trait Implementations§

Source§

impl Clone for TestConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TestConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TestConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for TestConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for TestConfig

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TestConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more