Files
wgpu/examples/src/hello_synchronization/tests.rs
Connor Fitzgerald 06e9876adf Move to A Single Example Executable (#4756)
* Move to combined examples

* Fix paths

* Curtail some tests

* Format

* Clippy

* Fix wasm

* Refactor main for wasm

* Style sheet

* Readme

* Lock
2023-11-23 05:26:42 -05:00

19 lines
660 B
Rust

use super::*;
use wgpu_test::{gpu_test, GpuTestConfiguration, TestParameters};
#[gpu_test]
static SYNC: GpuTestConfiguration = GpuTestConfiguration::new()
.parameters(
// Taken from hello-compute tests.
TestParameters::default()
.downlevel_flags(wgpu::DownlevelFlags::COMPUTE_SHADERS)
.limits(wgpu::Limits::downlevel_defaults()),
)
.run_async(|ctx| async move {
let ExecuteResults {
patient_workgroup_results,
hasty_workgroup_results: _,
} = execute(&ctx.device, &ctx.queue, ARR_SIZE).await;
assert_eq!(patient_workgroup_results, [16_u32; ARR_SIZE]);
});