mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 02:30:15 -06:00
#2504: the dehaze regression test also fails when the whole dark field renders black
Review follow-up (CodeRabbit): an all-black field made every comparison pass, so the field's own level must stay visible first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AbegtYaPuwqZ81pGfELsFK
This commit is contained in:
@@ -96,6 +96,8 @@ fn dehaze_does_not_crush_dark_regions_next_to_bright_ones() {
|
||||
}
|
||||
v.sort_unstable();
|
||||
let mid = v[v.len() / 2] as i32;
|
||||
// a field rendered all black would pass the comparison below vacuously
|
||||
assert!(mid > 2, "the dark field itself is crushed in ch {ch}: level {mid}");
|
||||
for y in 0..160 {
|
||||
for x in 0..120 {
|
||||
let p = r.get(x, y)[ch] as i32;
|
||||
|
||||
Reference in New Issue
Block a user