mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-27 11:37:02 -06:00
refactor(psd): move tests_<topic>.rs files to src/tests/
This commit is contained in:
@@ -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)]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user