]> Git — Sourcephile - haskell/symantic.git/blob - symantic-lib/test/HUnit/Tuple2.hs
Renames in symantic-document.
[haskell/symantic.git] / symantic-lib / test / HUnit / Tuple2.hs
1 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
2 module HUnit.Tuple2 where
3
4 import Test.Tasty
5 import Data.Proxy (Proxy(..))
6
7 import Language.Symantic.Lib
8 import Testing.Compiling
9
10 type SS =
11 [ Proxy (->)
12 , Proxy Integer
13 , Proxy ()
14 , Proxy (,)
15 ]
16 (==>) = readTe @() @SS
17
18 hunits :: TestTree
19 hunits = testGroup "Tuple2"
20 [ "()" ==> Right (tyUnit, (), "()")
21 , "(,) 1 2" ==> Right (tyTuple2 tyInteger tyInteger, (1,2), "(1, 2)")
22 , "(1,2)" ==> Right (tyTuple2 tyInteger tyInteger, (1,2), "(1, 2)")
23 , "((1,2), (3,4))" ==> Right
24 ( let t = tyTuple2 tyInteger tyInteger in tyTuple2 t t
25 , ((1,2),(3,4))
26 , "((1, 2), (3, 4))" )
27 ]