summaryrefslogtreecommitdiff
path: root/prototypes
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-04-08 16:52:37 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-04-08 16:52:37 +0200
commit7e13b27715de9c05054c03b19e385d93811b06e5 (patch)
treeb81e494249deb319b2190c7387464bb19e1c237f /prototypes
parenta696ca2bbcc2d1c0db8eb1d592a668d443236c9f (diff)
integrate tests
Diffstat (limited to 'prototypes')
-rw-r--r--prototypes/ShiftReducer.hs18
1 files changed, 5 insertions, 13 deletions
diff --git a/prototypes/ShiftReducer.hs b/prototypes/ShiftReducer.hs
index b77e0551..fc29286e 100644
--- a/prototypes/ShiftReducer.hs
+++ b/prototypes/ShiftReducer.hs
@@ -568,25 +568,17 @@ suc = lam $ add `app` Int 1 `app` Var 0
568 568
569-------- 569--------
570 570
571add_test :: SLExp 571id_test = hnf (idE `app` Int 10) == Int 10
572add_test = hnf $ add `app` Int 10 `app` Int 20
573 572
574succ_test :: SLExp 573add_test = hnf (add `app` Int 10 `app` Int 20) == Int 30
575succ_test = hnf $ suc `app` Int 10
576 574
577 575succ_test = hnf (suc `app` Int 10) == Int 11
578example1 = hnf $ app idE (Int 10)
579{-
580example2 = app (app add (Int 10)) (Int 5)
581
582
583-- = fun name args $ \x -> \y -> rhs e
584 576
585 577
586----------------------------------------------------------------- run all tests 578----------------------------------------------------------------- run all tests
587-} 579
588return [] 580return []
589runTests | mkLet_test1 = $quickCheckAll 581runTests | mkLet_test1 && id_test && add_test && succ_test = $quickCheckAll
590 582
591{- 583{-
592TODO 584TODO