From 09230a914f1ba7b5c5eeff50855ecea1ebc73bbf Mon Sep 17 00:00:00 2001 From: Khawar Zamman Wani Date: Fri, 20 Nov 2026 18:36:05 +0530 Subject: [PATCH] Tests: rotate the tone adjustments across sample types in the fused oracle test (#15932) Each adjustment runs once per mode and once per sample type instead of at every pair, which cuts the scalar-oracle calls to a third. --- crates/engine/src/color_channels/tone.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/color_channels/tone.rs b/crates/engine/src/color_channels/tone.rs index 3e96aa4965d..06618da39a9 100644 --- a/crates/engine/src/color_channels/tone.rs +++ b/crates/engine/src/color_channels/tone.rs @@ -304,7 +304,12 @@ mod tests { if ti != (mi + si) % 3 && !(mode == ColorMode::Rgb && sample == SampleType::U16 && selection.is_none()) { continue; } - for adjustment in &adjustments { + // Each adjustment meets every mode once and every sample type once: Invert at Lab/F32 (`lab_invert`), + // Threshold at RGB/U16 and Posterize at Lab/U16 (the U16 `depth`), Levels and Curves at U16 (table). + for (ai, adjustment) in adjustments.iter().enumerate() { + if (ai + mi) % 3 != si { + continue; + } let mut expected = source.clone(); let mut actual = source.clone(); super::super::adjust_reference(&mut expected, colors, adjustment, selection, bounds).unwrap();