diff --git a/tests/src/expectations.rs b/tests/src/expectations.rs index 29f405292..7d7dc9901 100644 --- a/tests/src/expectations.rs +++ b/tests/src/expectations.rs @@ -167,17 +167,15 @@ impl FailureCase { } /// Tests running on either Vulkan driver on macOS. - pub fn mac_vulkan(f: impl Fn(FailureCase) -> FailureCase) -> Vec { - vec![f(FailureCase::molten_vk()), f(FailureCase::kosmic_krisp())] + pub fn mac_vulkan() -> Vec { + vec![FailureCase::molten_vk(), FailureCase::kosmic_krisp()] } /// Tests running on macOS (both Vulkan and Metal). - pub fn mac(f: impl Fn(FailureCase) -> FailureCase) -> Vec { - vec![ - f(FailureCase::molten_vk()), - f(FailureCase::kosmic_krisp()), - f(FailureCase::backend(wgpu::Backends::METAL)), - ] + pub fn mac() -> Vec { + let mut cases = Self::mac_vulkan(); + cases.push(FailureCase::backend(wgpu::Backends::METAL)); + cases } pub fn lvp_poison_memory(message: &'static str) -> Self { diff --git a/tests/tests/wgpu-gpu/multiview/mod.rs b/tests/tests/wgpu-gpu/multiview/mod.rs index 60b305156..ba0ee924c 100644 --- a/tests/tests/wgpu-gpu/multiview/mod.rs +++ b/tests/tests/wgpu-gpu/multiview/mod.rs @@ -54,7 +54,7 @@ static DRAW_MULTIVIEW_NONCONTIGUOUS: GpuTestConfiguration = GpuTestConfiguration right: None", )); // https://github.com/gfx-rs/wgpu/issues/9184 and https://github.com/gfx-rs/wgpu/issues/9187 - failures.append(&mut FailureCase::mac_vulkan(|case| { + failures.extend(FailureCase::mac_vulkan().into_iter().map(|case| { case.panic( "assertion `left == right` failed: Expected 0\n left: Some(255)\n right: None", ) diff --git a/tests/tests/wgpu-gpu/subgroup_operations/mod.rs b/tests/tests/wgpu-gpu/subgroup_operations/mod.rs index 69ab7e5a1..2afa8f5a8 100644 --- a/tests/tests/wgpu-gpu/subgroup_operations/mod.rs +++ b/tests/tests/wgpu-gpu/subgroup_operations/mod.rs @@ -18,15 +18,18 @@ static SUBGROUP_OPERATIONS: GpuTestConfiguration = GpuTestConfiguration::new() // // Newlines are included in the panic message to ensure that _additional_ failures // are not matched against. - failures: wgpu_test::FailureCase::mac(|case| { - case - // 26.0 fails only test 28, and not on thread 0 - .panic("thread 1 failed tests: 28,\n") - // 14.3 fails 27 and 28 - .panic("thread 0 failed tests: 27,\nthread 1 failed tests: 27, 28,\n") - // Prior versions fail 27, 28, and 29 - .panic("thread 0 failed tests: 27, 29,\nthread 1 failed tests: 27, 28, 29,\n") - }), + failures: wgpu_test::FailureCase::mac() + .into_iter() + .map(|case| { + case + // 26.0 fails only test 28, and not on thread 0 + .panic("thread 1 failed tests: 28,\n") + // 14.3 fails 27 and 28 + .panic("thread 0 failed tests: 27,\nthread 1 failed tests: 27, 28,\n") + // Prior versions fail 27, 28, and 29 + .panic("thread 0 failed tests: 27, 29,\nthread 1 failed tests: 27, 28, 29,\n") + }) + .collect(), ..Default::default() }) .run_sync(|ctx| {