on master help sign in
add test cases verifying new verbatim string behavior
commit5fd758cc6b22481e50936f8fd8575bb9e8ad0d4a authorMichael Morgan <morgan.michael@me.com> dateThu 16 Nov 2017, 17:35 (9 years ago) parent612f918
2 files changed+18−10
test/primitives003/expected+4 test/primitives003/test038.idr+14−10
test/primitives003/expected+4
@@ -5,6 +5,10 @@ False
55True
66False
77True
8+True
9+True
10+True
11+True
812False
913True
1014False
test/primitives003/test038.idr+14−10
@@ -1,4 +1,4 @@
1−module Main
1+module Main
22
33import Data.Vect
44import Data.Fin
@@ -17,18 +17,22 @@ main = do
1717 putStrLn . show $ test "hello" "world"
1818 putStrLn . show $ test (the Char '\0') (the Char '\0')
1919 putStrLn . show $ test (the Char '\1') (the Char '\2')
20+ putStrLn . show $ test """""" ""
21+ putStrLn . show $ test """"hello"""" "\"hello\""
22+ putStrLn . show $ test """""hello""""" "\"\"hello\"\""
23+ putStrLn . show $ test """""""""" "\"\"\"\""
2024-- Non-primitives
2125 -- Vect
22− putStrLn . show $
26+ putStrLn . show $
2327 test (the (Vect _ Int) [1,2,3]) (the (Vect _ Int) [1,2,3])
24− putStrLn . show $
28+ putStrLn . show $
2529 test (the (Vect _ Int) [1,2,3]) (the (Vect _ Int) [1,2,4])
2630 -- List
27− putStrLn . show $
31+ putStrLn . show $
2832 test (the (List Int) [1,2,3]) (the (List Int) [1,2,3])
29− putStrLn . show $
33+ putStrLn . show $
3034 test (the (List Int) [1,2,3]) (the (List Int) [1,2])
31− putStrLn . show $
35+ putStrLn . show $
3236 test (the (List Int) [1,2,3]) (the (List Int) [1,2,4])
3337 -- Tuple
3438 putStrLn . show $
@@ -45,16 +49,16 @@ main = do
4549 putStrLn . show $ test (Just "hello") (Just "world")
4650 putStrLn . show $ test (Just "hello") Nothing
4751 -- Either
48− putStrLn . show $ test (the (Either String Bool) (Left "hello"))
52+ putStrLn . show $ test (the (Either String Bool) (Left "hello"))
4953 (the (Either String Bool) (Left "hello"))
50− putStrLn . show $ test (the (Either String Bool) (Left "hello"))
54+ putStrLn . show $ test (the (Either String Bool) (Left "hello"))
5155 (the (Either String Bool) (Left "world"))
5256 putStrLn . show $ test (Left "hello") (Right "world")
5357 putStrLn . show $ test (Left "hello") (Right False)
5458 -- Fin
55− putStrLn . show $ test (the (Fin (S (S (S (Z))))) (FS (FS (FZ))))
59+ putStrLn . show $ test (the (Fin (S (S (S (Z))))) (FS (FS (FZ))))
5660 (the (Fin (S (S (S (Z))))) (FS (FS (FZ))))
57− putStrLn . show $ test (the (Fin (S (S (S (Z))))) (FS (FS (FZ))))
61+ putStrLn . show $ test (the (Fin (S (S (S (Z))))) (FS (FS (FZ))))
5862 (the (Fin (S (S (S (Z))))) (FS (FZ)))
5963 -- Nat
6064 putStrLn . show $ test (S (S (S Z))) (S (S (S Z)))