forked from upenn-cis5520/empty-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpec.hs
35 lines (30 loc) · 845 Bytes
/
Spec.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import DFATest
import NFATest
import RegexOperationsTest
import RegexParserTest
import Test.HUnit
import Test.QuickCheck
import Test.QuickCheck qualified as QC
main :: IO ()
main = do
putStrLn "--- NFA Tests ---"
QC.quickCheck prop_bipartiteTrans
QC.quickCheck prop_alternateStillAccepts
QC.quickCheck prop_appendStillAccepts
QC.quickCheck prop_kleeneStillAccepts
QC.quickCheck prop_findAcceptingString
test_all_nfa
putStrLn ""
putStrLn "--- DFA Tests ---"
QC.quickCheck prop_DFAiffNFA
test_all_dfa
putStrLn ""
putStrLn "--- Regex Parser Tests ---"
QC.quickCheck (QC.forAll genRegExString prop_rpn_correct_length)
QC.quickCheck (QC.forAll genRegExString prop_parseable_regex)
test_all_regex_parser
putStrLn ""
putStrLn "--- Regex Operations Tests ---"
test_all_regex_operations
return ()
-- >>> main