aboutsummaryrefslogtreecommitdiffstats
path: root/test/Spec.hs
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2022-09-25 23:37:49 +0300
committerJan Tuomi <jans.tuomi@gmail.com>2022-12-05 14:21:53 +0200
commit82b9e3f4bf70e911916cf000655cdae2492060df (patch)
treeed41dfb8bfb05a1e642995974a58846f5f39cac2 /test/Spec.hs
parenta5ce95f40188c4525bc98307d09015a5dca93bb3 (diff)
Add a test to suite
Diffstat (limited to 'test/Spec.hs')
-rw-r--r--test/Spec.hs15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/Spec.hs b/test/Spec.hs
index cd4753f..cbe73d7 100644
--- a/test/Spec.hs
+++ b/test/Spec.hs
@@ -1,2 +1,15 @@
+{-# OPTIONS_GHC -Wno-missing-signatures #-}
+import Test.HUnit
+import Control.Monad.Except
+import Tokenizer ( tokenize )
+import TestUtils
+
+test1 = (runLContext $ tokenize "+ 1 2")
+ >>= assertEqual "tokenize \"+ 1 2\"" ["+", "1", "2"]
+
+tests = TestList $ map TestCase [
+ test1
+ ]
+
main :: IO ()
-main = putStrLn "Test suite not yet implemented"
+main = void $ runTestTT tests