mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-11-21 19:49: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,
|
||||
vector,
|
||||
vty,
|
||||
vty-unix,
|
||||
vty-crossplatform,
|
||||
QuickCheck
|
||||
|
@ -1,3 +1,4 @@
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
|
||||
|
@ -10,8 +10,7 @@ import Control.Monad (when)
|
||||
import Data.Monoid
|
||||
#endif
|
||||
import qualified Graphics.Vty as V
|
||||
import qualified Graphics.Vty.Platform.Unix.Output as VU
|
||||
import qualified Graphics.Vty.Platform.Unix.Settings as VU
|
||||
import qualified Graphics.Vty.CrossPlatform.Testing as V
|
||||
import Brick.Widgets.Border (hBorder)
|
||||
import Control.Exception (SomeException, try)
|
||||
|
||||
@ -20,7 +19,7 @@ region = (30, 10)
|
||||
|
||||
renderDisplay :: Ord n => [Widget n] -> IO ()
|
||||
renderDisplay ws = do
|
||||
outp <- VU.buildOutput =<< VU.defaultSettings
|
||||
outp <- V.mkDefaultOutput
|
||||
ctx <- V.displayContext outp region
|
||||
V.outputPicture ctx (renderWidget Nothing ws region)
|
||||
V.releaseDisplay outp
|
||||
|
Loading…
Reference in New Issue
Block a user