mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-11-22 05:36:00 +03:00
Update test suite to use vty-crossplatform
This commit is contained in:
parent
01827e29c7
commit
31f94e1b76
@ -575,5 +575,5 @@ test-suite brick-tests
|
|||||||
microlens,
|
microlens,
|
||||||
vector,
|
vector,
|
||||||
vty,
|
vty,
|
||||||
vty-unix,
|
vty-crossplatform,
|
||||||
QuickCheck
|
QuickCheck
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{-# LANGUAGE TypeOperators #-}
|
||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
{-# LANGUAGE TypeFamilies #-}
|
{-# LANGUAGE TypeFamilies #-}
|
||||||
|
|
||||||
|
@ -10,8 +10,7 @@ import Control.Monad (when)
|
|||||||
import Data.Monoid
|
import Data.Monoid
|
||||||
#endif
|
#endif
|
||||||
import qualified Graphics.Vty as V
|
import qualified Graphics.Vty as V
|
||||||
import qualified Graphics.Vty.Platform.Unix.Output as VU
|
import qualified Graphics.Vty.CrossPlatform.Testing as V
|
||||||
import qualified Graphics.Vty.Platform.Unix.Settings as VU
|
|
||||||
import Brick.Widgets.Border (hBorder)
|
import Brick.Widgets.Border (hBorder)
|
||||||
import Control.Exception (SomeException, try)
|
import Control.Exception (SomeException, try)
|
||||||
|
|
||||||
@ -20,7 +19,7 @@ region = (30, 10)
|
|||||||
|
|
||||||
renderDisplay :: Ord n => [Widget n] -> IO ()
|
renderDisplay :: Ord n => [Widget n] -> IO ()
|
||||||
renderDisplay ws = do
|
renderDisplay ws = do
|
||||||
outp <- VU.buildOutput =<< VU.defaultSettings
|
outp <- V.mkDefaultOutput
|
||||||
ctx <- V.displayContext outp region
|
ctx <- V.displayContext outp region
|
||||||
V.outputPicture ctx (renderWidget Nothing ws region)
|
V.outputPicture ctx (renderWidget Nothing ws region)
|
||||||
V.releaseDisplay outp
|
V.releaseDisplay outp
|
||||||
|
Loading…
Reference in New Issue
Block a user