summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Main.hs10
-rw-r--r--test/MindTest.hs16
2 files changed, 26 insertions, 0 deletions
diff --git a/test/Main.hs b/test/Main.hs
new file mode 100644
index 0000000..8847a07
--- /dev/null
+++ b/test/Main.hs
@@ -0,0 +1,10 @@
+module Main (main) where
+
+import Test.Tasty
+
+import qualified MindTest
+
+main :: IO ()
+main = defaultMain $ testGroup "all tests" $
+ [ MindTest.suite
+ ]
diff --git a/test/MindTest.hs b/test/MindTest.hs
new file mode 100644
index 0000000..227aa0c
--- /dev/null
+++ b/test/MindTest.hs
@@ -0,0 +1,16 @@
+module MindTest (suite) where
+
+import Test.Tasty
+import Test.Tasty.HUnit
+
+import Mind
+
+suite :: TestTree
+suite = testGroup "mind tests" $
+ [ neuronIndexTests
+ ]
+
+neuronIndexTests :: TestTree
+neuronIndexTests = testGroup "neuron index tests" $
+ [ testCase "get input index" $ getNeuronIndex (Input 4) @?= 4
+ ]