2017-01-22 20:22:15 +03:00
|
|
|
module Verify.Graphics.Vty.Prelude
|
|
|
|
( module Verify.Graphics.Vty.Prelude
|
|
|
|
, module Graphics.Vty.Prelude
|
|
|
|
, MockWindow(..)
|
|
|
|
)
|
|
|
|
where
|
2009-09-04 21:29:28 +04:00
|
|
|
|
2013-12-20 10:24:56 +04:00
|
|
|
import Graphics.Vty.Prelude
|
|
|
|
|
2009-09-04 21:29:28 +04:00
|
|
|
import Graphics.Vty.Debug
|
|
|
|
|
|
|
|
import Verify
|
|
|
|
|
2013-07-06 05:36:03 +04:00
|
|
|
data EmptyWindow = EmptyWindow MockWindow
|
2009-09-04 21:29:28 +04:00
|
|
|
|
|
|
|
instance Arbitrary EmptyWindow where
|
2013-07-06 05:36:03 +04:00
|
|
|
arbitrary = return $ EmptyWindow (MockWindow (0 :: Int) (0 :: Int))
|
2009-09-04 21:29:28 +04:00
|
|
|
|
|
|
|
instance Show EmptyWindow where
|
|
|
|
show (EmptyWindow _) = "EmptyWindow"
|
|
|
|
|
2013-07-06 05:36:03 +04:00
|
|
|
instance Arbitrary MockWindow where
|
2009-09-04 21:29:28 +04:00
|
|
|
arbitrary = do
|
2011-07-04 00:31:23 +04:00
|
|
|
w <- choose (1,1024)
|
|
|
|
h <- choose (1,1024)
|
2013-07-06 05:36:03 +04:00
|
|
|
return $ MockWindow w h
|
2009-09-04 21:29:28 +04:00
|
|
|
|