summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test.hs30
1 files changed, 30 insertions, 0 deletions
diff --git a/test.hs b/test.hs
new file mode 100644
index 0000000..a484e62
--- /dev/null
+++ b/test.hs
@@ -0,0 +1,30 @@
+
+import Test.HUnit
+import Thue.Parser
+import Fractran.Parser
+
+
+
+
+fractranParser1 = TestCase (assertEqual ""
+ (Right (FractranProgram [] 2))
+ (parseFractran "2"))
+
+fractranParser2 = TestCase (assertEqual ""
+ (Right (FractranProgram [] 2))
+ (parseFractran "2\n"))
+
+fractranParser3 = TestCase (assertEqual ""
+ (Right (FractranProgram [] 2))
+ (parseFractran "\n2"))
+
+fractranParser4 = TestCase (assertEqual ""
+ (Left x)
+ (parseFractran "2/3"))
+
+
+
+main = do
+ putStrLn "Fractran Parser"
+ runTestTT $ TestList [fractranParser1, fractranParser2, fractranParser3, fractranParser4]
+