diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-04-08 16:52:37 +0200 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-04-08 16:52:37 +0200 |
commit | 7e13b27715de9c05054c03b19e385d93811b06e5 (patch) | |
tree | b81e494249deb319b2190c7387464bb19e1c237f /prototypes | |
parent | a696ca2bbcc2d1c0db8eb1d592a668d443236c9f (diff) |
integrate tests
Diffstat (limited to 'prototypes')
-rw-r--r-- | prototypes/ShiftReducer.hs | 18 |
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 | ||
571 | add_test :: SLExp | 571 | id_test = hnf (idE `app` Int 10) == Int 10 |
572 | add_test = hnf $ add `app` Int 10 `app` Int 20 | ||
573 | 572 | ||
574 | succ_test :: SLExp | 573 | add_test = hnf (add `app` Int 10 `app` Int 20) == Int 30 |
575 | succ_test = hnf $ suc `app` Int 10 | ||
576 | 574 | ||
577 | 575 | succ_test = hnf (suc `app` Int 10) == Int 11 | |
578 | example1 = hnf $ app idE (Int 10) | ||
579 | {- | ||
580 | example2 = 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 | |
588 | return [] | 580 | return [] |
589 | runTests | mkLet_test1 = $quickCheckAll | 581 | runTests | mkLet_test1 && id_test && add_test && succ_test = $quickCheckAll |
590 | 582 | ||
591 | {- | 583 | {- |
592 | TODO | 584 | TODO |