Changeset 22 for sizechecking/branches/macs/tests
- Timestamp:
- May 3, 2014, 2:45:53 PM (11 years ago)
- Location:
- sizechecking/branches/macs/tests
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sizechecking/branches/macs/tests/OpsTest.hs
r21 r22 11 11 test1 = app (lam $ \x -> const 3 + x) (const 2) 12 12 13 test2 :: (LOps l) => l Int 14 test2 = app (lam $ \x -> const 3 * x) (const 2) 15 16 test3 :: (LOps l) => l Int 17 test3 = app (lam $ \x -> const 2 * x + const 1) (const 5 - const 2) 18 19 13 20 test1ast :: IO Bool 14 21 test1ast = do 15 22 t <- ast test1 16 23 return $ t "" == "(λa.3+a) 2" 24 17 25 test1eval :: IO Bool 18 26 test1eval = return $ eval test1 == 5 27 28 test2ast :: IO Bool 29 test2ast = do 30 t <- ast test2 31 return $ t "" == "(λa.3*a) 2" 32 33 test2eval :: IO Bool 34 test2eval = return $ eval test2 == 6 35 36 test3ast :: IO Bool 37 test3ast = do 38 t <- ast test3 39 return $ t "" == "(λa.2*a+1) (5-2)" 40 41 test3eval :: IO Bool 42 test3eval = return $ eval test3 == 7 19 43 20 44 tests :: [IO Bool]
Note: See TracChangeset
for help on using the changeset viewer.