summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2023-11-21 10:11:19 -0600
committersanine <sanine.not@pm.me>2023-11-21 10:11:19 -0600
commitd128c42a96110eceb3a82ff26263388efff20623 (patch)
tree3c9f44b50dc395b7d952663c10bb545bb521be27 /test
parentf9fc4d26ec5fca9ee175c8a6fbcdd0fa36f10947 (diff)
initial stack configuration
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
+ ]