Skip to content

Commit

Permalink
Update test suite to use vty-crossplatform
Browse files Browse the repository at this point in the history
  • Loading branch information
jtdaugherty committed Dec 15, 2023
1 parent 01827e2 commit 31f94e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion brick.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -575,5 +575,5 @@ test-suite brick-tests
microlens,
vector,
vty,
vty-unix,
vty-crossplatform,
QuickCheck
1 change: 1 addition & 0 deletions tests/Main.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}

Expand Down
5 changes: 2 additions & 3 deletions tests/Render.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down

0 comments on commit 31f94e1

Please sign in to comment.