diff options
Diffstat (limited to 'test/Xanthous/GameSpec.hs')
-rw-r--r-- | test/Xanthous/GameSpec.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Xanthous/GameSpec.hs b/test/Xanthous/GameSpec.hs index 32faae03d7a9..af98c7f6ccd2 100644 --- a/test/Xanthous/GameSpec.hs +++ b/test/Xanthous/GameSpec.hs @@ -30,4 +30,16 @@ test = testGroup "Xanthous.Game" , testGroup "character" [ testProperty "lens laws" $ isLens character ] + , localOption (QuickCheckTests 10) + $ testGroup "MessageHistory" + [ testGroup "MonoComonad laws" + [ testProperty "oextend oextract ≡ id" + $ \(mh :: MessageHistory) -> oextend oextract mh === mh + , testProperty "oextract ∘ oextend f ≡ f" + $ \(mh :: MessageHistory) f -> (oextract . oextend f) mh === f mh + , testProperty "oextend f ∘ oextend g ≡ oextend (f . oextend g)" + $ \(mh :: MessageHistory) f g -> + (oextend f . oextend g) mh === oextend (f . oextend g) mh + ] + ] ] |