diff options
Diffstat (limited to 'test/Xanthous/Data')
-rw-r--r-- | test/Xanthous/Data/LevelsSpec.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Xanthous/Data/LevelsSpec.hs b/test/Xanthous/Data/LevelsSpec.hs index 49d3719b1272..4e46946a93b0 100644 --- a/test/Xanthous/Data/LevelsSpec.hs +++ b/test/Xanthous/Data/LevelsSpec.hs @@ -37,6 +37,12 @@ test = testGroup "Xanthous.Data.Levels" , testProperty "extract is total" $ \(levels :: Levels Int) genned -> let levels' = runIdentity . nextLevel (Identity genned) $ levels in total $ extract levels' + , testProperty "uses the generated level as the next level" + $ \(levels :: Levels Int) genned -> + let levels' = seek (length levels - 1) levels + levels'' = runIdentity . nextLevel (Identity genned) $ levels' + in counterexample (show levels'') + $ extract levels'' === genned ] , testGroup "prevLevel" [ testProperty "seeks backwards" $ \(levels :: Levels Int) -> |