Move and rephrase comment

This commit is contained in:
George Thomas 2026-01-04 11:16:00 +00:00
parent f6771a7131
commit ab0a926e24

View File

@ -27,13 +27,13 @@ puzzle =
drawGrid (mkGrid input <&> \case InEmpty -> OutEmpty; InRoll -> OutRoll) `shouldBe` t
describe "frames" do
let frames = Seq.fromList $ takeUntil noneAccessible frameStream
-- note that `nFrames = Seq.length frames - 1`, but we don't define it as such
-- since that would force the expensive evaluation during test tree construction, messing up reporting
let nFrames = if isRealData then 58 else 9
for_ [0 .. nFrames] \n ->
it (show n) . pureGoldenTextFile (path <> "frames/" <> show n) $
maybe "frame list too short!" drawGrid (Seq.lookup n frames)
it "end" do
-- we can't actually define `nFrames` this way as it would messing up reporting,
-- due to forcing the expensive evaluation during test tree construction
Seq.length frames `shouldBe` (nFrames + 1)
Just g <- pure $ Seq.lookup nFrames frames
(g `shouldSatisfyNamed` "accessible tile found") noneAccessible