{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Trans.Bool.Const.Test where import Test.Tasty import Test.Tasty.HUnit import qualified Data.Text as Text import qualified Expr.Bool.Test as Bool import qualified Repr.Text.Test () import Language.LOL.Symantic.Repr import Language.LOL.Symantic.Trans tests :: TestTree tests = testGroup "Const" $ let (==>) expr expected = testCase (Text.unpack expected) $ (@?= expected) $ text_from_expr (trans_bool_const expr) in [ Bool.e1 ==> "False" , Bool.e2 ==> "True" , Bool.e3 ==> "True" , Bool.e4 ==> "True" , Bool.e5 ==> "!x" , Bool.e6 ==> "(x | y) & !(x & y)" , Bool.e7 ==> "((x | y) & !(x & y) | z) & !(((x | y) & !(x & y)) & z)" , Bool.e8 ==> "(x | !y) & !(x & !y)" ]