Skip to content

Commit 09d0c94

Browse files
committed
Use explicit test enumeration
1 parent 86d5211 commit 09d0c94

File tree

113 files changed

+898
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+898
-138
lines changed

examples/features/src/big_compute_buffers/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,4 +248,4 @@ pub fn main() {
248248

249249
#[cfg(test)]
250250
#[cfg(not(target_arch = "wasm32"))]
251-
mod tests;
251+
pub mod tests;

examples/features/src/big_compute_buffers/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::*;
22
use wgpu_test::{gpu_test, GpuTestConfiguration, TestParameters};
33

44
#[gpu_test]
5-
static TWO_BUFFERS: GpuTestConfiguration = GpuTestConfiguration::new()
5+
pub static TWO_BUFFERS: GpuTestConfiguration = GpuTestConfiguration::new()
66
.parameters(
77
TestParameters::default()
88
.features(

examples/features/src/boids/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ pub fn main() {
323323

324324
#[cfg(test)]
325325
#[wgpu_test::gpu_test]
326-
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
326+
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
327327
name: "boids",
328328
// Generated on 1080ti on Vk/Windows
329329
image_path: "/examples/features/src/boids/screenshot.png",

examples/features/src/bunnymark/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ pub fn main() {
434434

435435
#[cfg(test)]
436436
#[wgpu_test::gpu_test]
437-
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
437+
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
438438
name: "bunnymark",
439439
image_path: "/examples/features/src/bunnymark/screenshot.png",
440440
width: 1024,

examples/features/src/conservative_raster/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ pub fn main() {
317317

318318
#[cfg(test)]
319319
#[wgpu_test::gpu_test]
320-
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
320+
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
321321
name: "conservative-raster",
322322
image_path: "/examples/features/src/conservative_raster/screenshot.png",
323323
width: 1024,

examples/features/src/cube/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ pub fn main() {
381381

382382
#[cfg(test)]
383383
#[wgpu_test::gpu_test]
384-
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
384+
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
385385
name: "cube",
386386
// Generated on 1080ti on Vk/Windows
387387
image_path: "/examples/features/src/cube/screenshot.png",
@@ -397,7 +397,7 @@ static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTest
397397

398398
#[cfg(test)]
399399
#[wgpu_test::gpu_test]
400-
static TEST_LINES: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
400+
pub static TEST_LINES: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
401401
name: "cube-lines",
402402
// Generated on 1080ti on Vk/Windows
403403
image_path: "/examples/features/src/cube/screenshot-lines.png",

examples/features/src/hello_synchronization/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,4 +208,4 @@ pub fn main() {
208208
}
209209

210210
#[cfg(test)]
211-
mod tests;
211+
pub mod tests;

examples/features/src/hello_synchronization/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::*;
22
use wgpu_test::{gpu_test, GpuTestConfiguration, TestParameters};
33

44
#[gpu_test]
5-
static SYNC: GpuTestConfiguration = GpuTestConfiguration::new()
5+
pub static SYNC: GpuTestConfiguration = GpuTestConfiguration::new()
66
.parameters(
77
// Taken from hello-compute tests.
88
TestParameters::default()

examples/features/src/lib.rs

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,52 @@ pub mod uniform_values;
3636
pub mod water;
3737

3838
#[cfg(test)]
39-
wgpu_test::gpu_test_main!();
39+
fn all_tests() -> Vec<wgpu_test::GpuTestInitializer> {
40+
#[cfg_attr(
41+
target_arch = "wasm32",
42+
expect(unused_mut, reason = "non-wasm32 needs this mutable")
43+
)]
44+
let mut test_list = vec![
45+
boids::TEST,
46+
bunnymark::TEST,
47+
conservative_raster::TEST,
48+
cube::TEST,
49+
cube::TEST_LINES,
50+
hello_synchronization::tests::SYNC,
51+
mipmap::TEST,
52+
mipmap::TEST_QUERY,
53+
msaa_line::TEST,
54+
multiple_render_targets::TEST,
55+
ray_cube_compute::TEST,
56+
ray_cube_fragment::TEST,
57+
ray_cube_normals::TEST,
58+
ray_scene::TEST,
59+
ray_shadows::TEST,
60+
ray_traced_triangle::TEST,
61+
shadow::TEST,
62+
skybox::TEST,
63+
skybox::TEST_ASTC,
64+
skybox::TEST_BCN,
65+
skybox::TEST_ETC2,
66+
srgb_blend::TEST_LINEAR,
67+
srgb_blend::TEST_SRGB,
68+
stencil_triangles::TEST,
69+
texture_arrays::TEST,
70+
texture_arrays::TEST_NON_UNIFORM,
71+
texture_arrays::TEST_UNIFORM,
72+
timestamp_queries::tests::TIMESTAMPS_ENCODER,
73+
timestamp_queries::tests::TIMESTAMPS_PASSES,
74+
timestamp_queries::tests::TIMESTAMPS_PASS_BOUNDARIES,
75+
water::TEST,
76+
];
77+
78+
#[cfg(not(target_arch = "wasm32"))]
79+
{
80+
test_list.push(big_compute_buffers::tests::TWO_BUFFERS);
81+
}
82+
83+
test_list
84+
}
85+
86+
#[cfg(test)]
87+
wgpu_test::gpu_test_main!(all_tests());

examples/features/src/mipmap/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ pub fn main() {
508508

509509
#[cfg(test)]
510510
#[wgpu_test::gpu_test]
511-
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
511+
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
512512
name: "mipmap",
513513
image_path: "/examples/features/src/mipmap/screenshot.png",
514514
width: 1024,
@@ -521,7 +521,7 @@ static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTest
521521

522522
#[cfg(test)]
523523
#[wgpu_test::gpu_test]
524-
static TEST_QUERY: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
524+
pub static TEST_QUERY: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
525525
name: "mipmap-query",
526526
image_path: "/examples/features/src/mipmap/screenshot_query.png",
527527
width: 1024,

0 commit comments

Comments
 (0)