Move and rephrase comment
This commit is contained in:
parent
f6771a7131
commit
ab0a926e24
@ -27,13 +27,13 @@ puzzle =
|
|||||||
drawGrid (mkGrid input <&> \case InEmpty -> OutEmpty; InRoll -> OutRoll) `shouldBe` t
|
drawGrid (mkGrid input <&> \case InEmpty -> OutEmpty; InRoll -> OutRoll) `shouldBe` t
|
||||||
describe "frames" do
|
describe "frames" do
|
||||||
let frames = Seq.fromList $ takeUntil noneAccessible frameStream
|
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
|
let nFrames = if isRealData then 58 else 9
|
||||||
for_ [0 .. nFrames] \n ->
|
for_ [0 .. nFrames] \n ->
|
||||||
it (show n) . pureGoldenTextFile (path <> "frames/" <> show n) $
|
it (show n) . pureGoldenTextFile (path <> "frames/" <> show n) $
|
||||||
maybe "frame list too short!" drawGrid (Seq.lookup n frames)
|
maybe "frame list too short!" drawGrid (Seq.lookup n frames)
|
||||||
it "end" do
|
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)
|
Seq.length frames `shouldBe` (nFrames + 1)
|
||||||
Just g <- pure $ Seq.lookup nFrames frames
|
Just g <- pure $ Seq.lookup nFrames frames
|
||||||
(g `shouldSatisfyNamed` "accessible tile found") noneAccessible
|
(g `shouldSatisfyNamed` "accessible tile found") noneAccessible
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user