-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
darcs-hash:20080909150531-fb517-c954b66f63145576b01a13d0c17cc28187c084eb.gz
- Loading branch information
Showing
3 changed files
with
50 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{-# OPTIONS_GHC -Wall #-} | ||
---------------------------------------------------------------------- | ||
-- | | ||
-- Module : Tests | ||
-- Copyright : (c) Conal Elliott 2008 | ||
-- License : BSD3 | ||
-- | ||
-- Maintainer : conal@conal.net | ||
-- Stability : experimental | ||
-- | ||
-- Unamb tests | ||
---------------------------------------------------------------------- | ||
|
||
module Tests where | ||
|
||
import Test.QuickCheck.Checkers | ||
import Test.QuickCheck.Later | ||
|
||
import Data.Unamb | ||
|
||
main :: IO () | ||
main = quickBatch batch | ||
|
||
|
||
batch :: TestBatch | ||
batch = ( "FRP.Reactive.Unamb" | ||
, [ ("both identity", bothId unambt hang) | ||
, ("idempotence" , idempotent2 unambt) | ||
, ("commutative" , isCommutTimes 0.00001 unambt) | ||
, ("associative" , isAssocTimes 0.00001 unambt) | ||
] | ||
) | ||
where | ||
-- monomorphic test version | ||
unambt :: NumT -> NumT -> NumT | ||
unambt = unamb | ||
|
||
-- The commutative and associative test take a long time because of the | ||
-- intentional delays. I don't understand the magnitude of the delays, | ||
-- however. They appear to be 1000 times what I'd expect. For instance, | ||
-- 0.00001 sec time 500 tests is 5 milliseconds, but I count about 10 | ||
-- seconds. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters