Crate wgpu_test

Source
Expand description

Test utilities for the wgpu repository.

Re-exports§

pub use self::image::ComparisonType;

Modules§

config 🔒
expectations 🔒
image
Image comparison utilities
init 🔒
isolation 🔒
native
Infrastructure for the native, cargo-nextest based harness.
params 🔒
poll 🔒
report 🔒
run 🔒

Macros§

gpu_test_main
Adds the necessary main function for our gpu test harness.

Structs§

FailureApplicationReasons
Reason why a test matches a given failure case.
FailureCase
Conditions under which a test should fail or be skipped.
FailureReason
Reason why a test is expected to fail.
GpuTestConfiguration
Configuration for a GPU test.
TestParameters
This information determines if a test should run.
TestingContext
Parameters and resources handed to the test function.

Enums§

FailureBehavior

Functions§

did_fail
Returns true if the provided callback fails validation.
did_fill_error_scope 🔒
did_oom
Returns true if the provided callback encounters an out-of-memory error.
execute_test
Execute the given test configuration with the given adapter report.
fail
Run some code in an error scope and assert that validation fails.
fail_if
Run some code in an error scope and assert that validation succeeds or fails depending on the provided should_fail boolean.
initialize_adapter
Initialize a wgpu adapter, using the given adapter report to match the adapter.
initialize_device
Initialize a wgpu device from a given adapter.
initialize_instance
Initialize a wgpu instance with the options from the environment.
valid
Run some code in an error scope and assert that validation succeeds.

Type Aliases§

GpuTestInitializer

Attribute Macros§

gpu_test
Creates a test that will run on all gpus on a given system.