refactor(psd): move tests_<topic>.rs files to src/tests/

This commit is contained in:
aiongg
2026-10-26 21:49:11 +00:00
parent 576f1d1706
commit 140b8d911c
4 changed files with 10 additions and 11 deletions
-4
View File
@@ -1493,10 +1493,6 @@ fn lab_to_rgb(l: f32, a: f32, b: f32) -> [f32; 3] {
mod memory_tests;
#[cfg(test)]
mod tests;
#[cfg(test)]
mod tests_integration;
#[cfg(test)]
mod tests_opt;
/// Test-only call counters (per thread), to prove what the optimised paths avoid doing.
#[cfg(test)]
+3
View File
@@ -1,6 +1,9 @@
use super::write::*;
use super::*;
mod integration;
mod opt;
fn gradient(w: u32, h: u32) -> Vec<[f32; 4]> {
(0..w * h).map(|i| [(i % w) as f32 / (w - 1).max(1) as f32, (i / w) as f32 / (h - 1).max(1) as f32, 0.25, 1.0]).collect()
}
@@ -2,9 +2,9 @@
//! the limit, a NaN text transform), a damaged layer section, and a tiny file claiming a huge
//! image. Each ends in a clean result or a clean error, on a 2 MiB stack, never a panic.
use super::memory_tests::with_merged;
use super::write::*;
use super::*;
use crate::memory_tests::with_merged;
use crate::write::*;
use crate::*;
/// Run `f` on a 2 MiB thread; a panic or stack overflow in it fails the test.
fn on_small_stack<T: Send + 'static>(f: impl FnOnce() -> T + Send + 'static) -> T {
@@ -1,10 +1,10 @@
//! The optimised decode / mask / placed-bake paths against the implementations they replaced
//! (kept below verbatim as references), and counters for the work they no longer do.
use super::counters::{self, INSIDE, QUAD, SCRATCH};
use super::placed::{Warp, square_to_quad};
use super::write::*;
use super::*;
use crate::counters::{self, INSIDE, QUAD, SCRATCH};
use crate::placed::{Warp, square_to_quad};
use crate::write::*;
use crate::*;
// ------------------------------------------------------------------ the replaced code