1 {-# LANGUAGE OverloadedStrings #-}
2 {-# OPTIONS_GHC -fno-warn-orphans #-}
4 module Trans.Bool.Const.Test where
7 import Test.Tasty.HUnit
9 import qualified Data.Text as Text
11 import qualified Expr.Bool.Test as Bool
12 import qualified Repr.Text.Test ()
13 import Language.Symantic.Repr
14 import Language.Symantic.Trans
17 tests = testGroup "Const" $
18 let (==>) expr expected =
19 testCase (Text.unpack expected) $
21 text_from_expr (trans_bool_const expr) in
27 , Bool.e6 ==> "(x || y) && !(x && y)"
28 , Bool.e7 ==> "((x || y) && !(x && y) || z) && !(((x || y) && !(x && y)) && z)"
29 , Bool.e8 ==> "(x || !y) && !(x && !y)"