Finish reconciling the whole-chain tests the three kernels each rewrote
Sharpening, noise reduction and clarity were written in parallel and each rewrote the same two tests, which had counted one fused block per operation — true only while every operation was a point function. Kept the exclusive-or formulation: each operation must reach exactly one of the two stages. A count cannot tell "moved to the detail stage" from "vanished from both", and that ambiguity is what broke these tests three times over. The merge left two fragments of the versions it replaced — a loop over a set that no longer exists, and the tail of an assertion whose head was gone. The loop is not restored: `point ^ neighbourhood` already asserts per operation what it checked over the set. The assertion is, because it catches a different fault from the exclusive-or — a block in the shader that nothing in the chain asked for, rather than an operation in the wrong stage.
This commit is contained in:
@@ -148,16 +148,6 @@ mod tests {
|
||||
fused_blocks,
|
||||
"the fused shader carries a block nothing in the chain asked for"
|
||||
);
|
||||
|
||||
// And each neighbourhood operation is genuinely absent from the fused
|
||||
// shader rather than merely uncounted — the arithmetic above would be
|
||||
// satisfied just as well by two errors that cancelled.
|
||||
for id in &neighbourhood {
|
||||
assert!(
|
||||
!shader.source.contains(&format!("---- {id} ----")),
|
||||
"{id} reads its neighbours and cannot be a fused fragment"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user