1
0
forked from GitHub/gf-core

another way to test for big numbers

This commit is contained in:
Krasimir Angelov
2023-03-02 09:37:21 +01:00
parent b8c9569f04
commit 23a5a3cdef

View File

@@ -66,8 +66,8 @@ main = do
,TestCase (assertEqual "fresh variables 1" "\\v,v1->v1" (showExpr [] (EAbs Explicit "v" (EAbs Explicit "v" (EVar 0)))))
,TestCase (assertEqual "fresh variables 2" "\\v,v1->v" (showExpr [] (EAbs Explicit "v" (EAbs Explicit "v" (EVar 1)))))
,TestCase (assertEqual "fresh variables 3" "\\v,v1,v2->v1" (showExpr [] (EAbs Explicit "v" (EAbs Explicit "v" (EAbs Explicit "v" (EVar 1))))))
,TestCase (assertBool "large integer 1" (null [n | n <- ns, showExpr [] (ELit (LInt n)) /= show n]))
,TestCase (assertBool "large integer 2" (null [n | n <- ns, readExpr (show n) /= Just (ELit (LInt n))]))
,TestCase (assertEqual "large integer 1" [] [n | n <- ns, showExpr [] (ELit (LInt n)) /= show n])
,TestCase (assertEqual "large integer 2" [] [n | n <- ns, readExpr (show n) /= Just (ELit (LInt n))])
,TestCase (assertEqual "unicode names 1" (Just "'абв'") (fmap (showExpr []) (readExpr "'абв'")))
,TestCase (assertEqual "unicode names 2" (Just "ab") (fmap (showExpr []) (readExpr "'ab'")))
,TestCase (assertEqual "unicode names 3" (Just "a'b") (fmap (showExpr []) (readExpr "'a\\'b'")))