Skip to main content

Module test_catalog

Module test_catalog 

Source
Expand description

The catalog that lets one test body run under libtest-mimic natively and in a browser through wasm.

gpu_tests! collects a file’s tests into the catalog the harness runs, and gpu_test_main! supplies the main that drives it. One source file serves both runners, because a body is an ordinary async fn and both runners reach it through the same all_tests().

A body is async even when it awaits nothing in particular: the device it asks Ctx::headless for comes from wgpu’s asynchronous adapter and device requests, which a browser cannot satisfy without yielding.

Re-exports§

use core::future::Future; 🔒
use core::pin::Pin; 🔒

Structs§

TestEntry
One test the harness knows how to run.

Type Aliases§

TestBody
A test’s future, boxed so bodies of different types share one catalog.
TestFn
Builds one test’s future. Called once per run.