From d128c42a96110eceb3a82ff26263388efff20623 Mon Sep 17 00:00:00 2001 From: sanine Date: Tue, 21 Nov 2023 10:11:19 -0600 Subject: initial stack configuration --- test/Main.hs | 10 ++++++++++ test/MindTest.hs | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 test/Main.hs create mode 100644 test/MindTest.hs (limited to 'test') 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 + ] -- cgit v1.2.1