File: TestRegExp.hs

package info (click to toggle)
haskell-lazysmallcheck 0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 204 kB
  • sloc: haskell: 1,230; sh: 15; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 388 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import Test.LazySmallCheck
import RegExp
import System

instance Serial Nat where
  series = cons0 Zer \/ cons1 Suc

instance Serial Sym where
  series = cons0 N0 \/ cons1 N1

instance Serial RE where
  series = cons1 Sym
        \/ cons2 Or
        \/ cons2 Seq
        \/ cons2 And
        \/ cons1 Star
        \/ cons0 Empty

main = do [d] <- getArgs ; depthCheck (read d) prop_regex