EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
refactor(gpu): move loose test files to src/tests/
aiongg959322dc38d8
diff --git a/crates/gpu/src/lib.rs b/crates/gpu/src/lib.rsindex 1064a216d..d0407bee7 100644--- a/crates/gpu/src/lib.rs+++ b/crates/gpu/src/lib.rs@@ -407,59 +407,3 @@ impl effectcraft_effects::psim::ParticleSim for Gpu {#[cfg(test)]mod tests;-#[cfg(test)]-mod tests_3d;-#[cfg(test)]-mod tests_adjust;-#[cfg(test)]-mod tests_adv3d;-#[cfg(test)]-mod tests_deferred;-#[cfg(test)]-mod tests_deferred_jobs;-#[cfg(test)]-mod tests_fx_color;-#[cfg(test)]-mod tests_fx_depth;-#[cfg(test)]-mod tests_fx_distort;-#[cfg(test)]-mod tests_fx_extra;-#[cfg(test)]-mod tests_fx_gen2;-#[cfg(test)]-mod tests_fx_generate;-#[cfg(test)]-mod tests_fx_key;-#[cfg(test)]-mod tests_fx_light;-#[cfg(test)]-mod tests_fx_lut;-#[cfg(test)]-mod tests_fx_noise;-#[cfg(test)]-mod tests_fx_particles;-#[cfg(test)]-mod tests_fx_pixel2;-#[cfg(test)]-mod tests_fx_sim;-#[cfg(test)]-mod tests_fx_stylize;-#[cfg(test)]-mod tests_fx_text;-#[cfg(test)]-mod tests_fx_time;-#[cfg(test)]-mod tests_fx_tone;-#[cfg(test)]-mod tests_fx_transition;-#[cfg(test)]-mod tests_fx_vr;-#[cfg(test)]-mod tests_fx_warp;-#[cfg(all(test, not(target_arch = "wasm32")))]-mod tests_init;-#[cfg(test)]-mod tests_particles;-#[cfg(test)]-mod tests_wgsl_grammar;diff --git a/crates/gpu/src/tests.rs b/crates/gpu/src/tests.rsindex 6c7b3ffb2..e12219414 100644--- a/crates/gpu/src/tests.rs+++ b/crates/gpu/src/tests.rs@@ -26,6 +26,36 @@ use effectcraft_time::{FrameRate, Tick};use crate::Gpu;+mod three_d;+mod adjust;+mod adv3d;+mod deferred;+mod deferred_jobs;+mod fx_color;+mod fx_depth;+mod fx_distort;+mod fx_extra;+mod fx_gen2;+mod fx_generate;+mod fx_key;+mod fx_light;+mod fx_lut;+mod fx_noise;+mod fx_particles;+mod fx_pixel2;+mod fx_sim;+mod fx_stylize;+mod fx_text;+mod fx_time;+mod fx_tone;+mod fx_transition;+mod fx_vr;+mod fx_warp;+#[cfg(all(test, not(target_arch = "wasm32")))]+mod init;+mod particles;+mod wgsl_grammar;+/// One GPU test at a time in this process: the calling test thread holds a process-wide lock/// until it exits (libtest runs every test on a thread of its own). wgpu's OpenGL backend (Mesa/// llvmpipe on FreeBSD, Linux without Vulkan) has one context lock per adapter and panics when adiff --git a/crates/gpu/src/tests_adjust.rs b/crates/gpu/src/tests/adjust.rssimilarity index 100%rename from crates/gpu/src/tests_adjust.rsrename to crates/gpu/src/tests/adjust.rsdiff --git a/crates/gpu/src/tests_adv3d.rs b/crates/gpu/src/tests/adv3d.rssimilarity index 100%rename from crates/gpu/src/tests_adv3d.rsrename to crates/gpu/src/tests/adv3d.rsdiff --git a/crates/gpu/src/tests_deferred.rs b/crates/gpu/src/tests/deferred.rssimilarity index 100%rename from crates/gpu/src/tests_deferred.rsrename to crates/gpu/src/tests/deferred.rsdiff --git a/crates/gpu/src/tests_deferred_jobs.rs b/crates/gpu/src/tests/deferred_jobs.rssimilarity index 95%rename from crates/gpu/src/tests_deferred_jobs.rsrename to crates/gpu/src/tests/deferred_jobs.rsindex 7f10f53d4..aa885b1de 100644--- a/crates/gpu/src/tests_deferred_jobs.rs+++ b/crates/gpu/src/tests/deferred_jobs.rs@@ -9,9 +9,9 @@ use effectcraft_render::{Accelerator, Backend, LayerCache, NoFootage, RenderOptsuse effectcraft_time::Tick;use crate::tests::{Pattern, diff, n, tolerance};-use crate::tests_adv3d::{off_share, run_of, scene, scene_project};-use crate::tests_deferred::{deferred_gpu, render_passes};-use crate::tests_particles::{Host, agree, params};+use crate::tests::adv3d::{off_share, run_of, scene, scene_project};+use crate::tests::deferred::{deferred_gpu, render_passes};+use crate::tests::particles::{Host, agree, params};/// The device's readbacks have landed (the browser's event loop; natively a poll).fn settle(g: &crate::Gpu) {@@ -87,7 +87,7 @@ fn advanced_3d_resolves_in_passes() {#[test]fn job_frames_render_in_passes() {let Some((g, _lock)) = deferred_gpu() else { return };- let s = crate::tests_deferred::scene();+ let s = crate::tests::deferred::scene();let t = Tick::from_seconds_f64(0.5);let cache = LayerCache::default();cache.set_gate(g.miss_gate());diff --git a/crates/gpu/src/tests_fx_color.rs b/crates/gpu/src/tests/fx_color.rssimilarity index 100%rename from crates/gpu/src/tests_fx_color.rsrename to crates/gpu/src/tests/fx_color.rsdiff --git a/crates/gpu/src/tests_fx_depth.rs b/crates/gpu/src/tests/fx_depth.rssimilarity index 100%rename from crates/gpu/src/tests_fx_depth.rsrename to crates/gpu/src/tests/fx_depth.rsdiff --git a/crates/gpu/src/tests_fx_distort.rs b/crates/gpu/src/tests/fx_distort.rssimilarity index 100%rename from crates/gpu/src/tests_fx_distort.rsrename to crates/gpu/src/tests/fx_distort.rsdiff --git a/crates/gpu/src/tests_fx_extra.rs b/crates/gpu/src/tests/fx_extra.rssimilarity index 100%rename from crates/gpu/src/tests_fx_extra.rsrename to crates/gpu/src/tests/fx_extra.rsdiff --git a/crates/gpu/src/tests_fx_gen2.rs b/crates/gpu/src/tests/fx_gen2.rssimilarity index 99%rename from crates/gpu/src/tests_fx_gen2.rsrename to crates/gpu/src/tests/fx_gen2.rsindex 8eba75c8c..c82aba8d1 100644--- a/crates/gpu/src/tests_fx_gen2.rs+++ b/crates/gpu/src/tests/fx_gen2.rs@@ -8,7 +8,7 @@ use effectcraft_keyframe::Value;use effectcraft_time::Tick;use crate::tests::{c, n};-use crate::tests_fx_pixel2::{e, env_case, env_case_allow, env_case_at, off, on, pt};+use crate::tests::fx_pixel2::{e, env_case, env_case_allow, env_case_at, off, on, pt};fn layer(id: u64) -> Value {Value::Layer(Some(id))diff --git a/crates/gpu/src/tests_fx_generate.rs b/crates/gpu/src/tests/fx_generate.rssimilarity index 100%rename from crates/gpu/src/tests_fx_generate.rsrename to crates/gpu/src/tests/fx_generate.rsdiff --git a/crates/gpu/src/tests_fx_key.rs b/crates/gpu/src/tests/fx_key.rssimilarity index 100%rename from crates/gpu/src/tests_fx_key.rsrename to crates/gpu/src/tests/fx_key.rsdiff --git a/crates/gpu/src/tests_fx_light.rs b/crates/gpu/src/tests/fx_light.rssimilarity index 100%rename from crates/gpu/src/tests_fx_light.rsrename to crates/gpu/src/tests/fx_light.rsdiff --git a/crates/gpu/src/tests_fx_lut.rs b/crates/gpu/src/tests/fx_lut.rssimilarity index 100%rename from crates/gpu/src/tests_fx_lut.rsrename to crates/gpu/src/tests/fx_lut.rsdiff --git a/crates/gpu/src/tests_fx_noise.rs b/crates/gpu/src/tests/fx_noise.rssimilarity index 100%rename from crates/gpu/src/tests_fx_noise.rsrename to crates/gpu/src/tests/fx_noise.rsdiff --git a/crates/gpu/src/tests_fx_particles.rs b/crates/gpu/src/tests/fx_particles.rssimilarity index 99%rename from crates/gpu/src/tests_fx_particles.rsrename to crates/gpu/src/tests/fx_particles.rsindex b67df9a43..139363b78 100644--- a/crates/gpu/src/tests_fx_particles.rs+++ b/crates/gpu/src/tests/fx_particles.rs@@ -8,7 +8,7 @@ use effectcraft_render::RenderOpts;use effectcraft_time::Tick;use crate::tests::{Scene, check, compare_at, n, opts, set};-use crate::tests_fx_sim::{case, composited, e, off, on};+use crate::tests::fx_sim::{case, composited, e, off, on};fn v2(x: f64, y: f64) -> Value {Value::Vec2([x, y])diff --git a/crates/gpu/src/tests_fx_pixel2.rs b/crates/gpu/src/tests/fx_pixel2.rssimilarity index 100%rename from crates/gpu/src/tests_fx_pixel2.rsrename to crates/gpu/src/tests/fx_pixel2.rsdiff --git a/crates/gpu/src/tests_fx_sim.rs b/crates/gpu/src/tests/fx_sim.rssimilarity index 100%rename from crates/gpu/src/tests_fx_sim.rsrename to crates/gpu/src/tests/fx_sim.rsdiff --git a/crates/gpu/src/tests_fx_stylize.rs b/crates/gpu/src/tests/fx_stylize.rssimilarity index 100%rename from crates/gpu/src/tests_fx_stylize.rsrename to crates/gpu/src/tests/fx_stylize.rsdiff --git a/crates/gpu/src/tests_fx_text.rs b/crates/gpu/src/tests/fx_text.rssimilarity index 100%rename from crates/gpu/src/tests_fx_text.rsrename to crates/gpu/src/tests/fx_text.rsdiff --git a/crates/gpu/src/tests_fx_time.rs b/crates/gpu/src/tests/fx_time.rssimilarity index 100%rename from crates/gpu/src/tests_fx_time.rsrename to crates/gpu/src/tests/fx_time.rsdiff --git a/crates/gpu/src/tests_fx_tone.rs b/crates/gpu/src/tests/fx_tone.rssimilarity index 100%rename from crates/gpu/src/tests_fx_tone.rsrename to crates/gpu/src/tests/fx_tone.rsdiff --git a/crates/gpu/src/tests_fx_transition.rs b/crates/gpu/src/tests/fx_transition.rssimilarity index 100%rename from crates/gpu/src/tests_fx_transition.rsrename to crates/gpu/src/tests/fx_transition.rsdiff --git a/crates/gpu/src/tests_fx_vr.rs b/crates/gpu/src/tests/fx_vr.rssimilarity index 100%rename from crates/gpu/src/tests_fx_vr.rsrename to crates/gpu/src/tests/fx_vr.rsdiff --git a/crates/gpu/src/tests_fx_warp.rs b/crates/gpu/src/tests/fx_warp.rssimilarity index 100%rename from crates/gpu/src/tests_fx_warp.rsrename to crates/gpu/src/tests/fx_warp.rsdiff --git a/crates/gpu/src/tests_init.rs b/crates/gpu/src/tests/init.rssimilarity index 100%rename from crates/gpu/src/tests_init.rsrename to crates/gpu/src/tests/init.rsdiff --git a/crates/gpu/src/tests_particles.rs b/crates/gpu/src/tests/particles.rssimilarity index 100%rename from crates/gpu/src/tests_particles.rsrename to crates/gpu/src/tests/particles.rsdiff --git a/crates/gpu/src/tests_3d.rs b/crates/gpu/src/tests/three_d.rssimilarity index 100%rename from crates/gpu/src/tests_3d.rsrename to crates/gpu/src/tests/three_d.rsdiff --git a/crates/gpu/src/tests_wgsl_grammar.rs b/crates/gpu/src/tests/wgsl_grammar.rssimilarity index 100%rename from crates/gpu/src/tests_wgsl_grammar.rsrename to crates/gpu/src/tests/wgsl_grammar.rs