summaryrefslogtreecommitdiff
path: root/test/MindTest.hs
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2023-11-21 10:35:07 -0600
committersanine <sanine.not@pm.me>2023-11-21 10:35:07 -0600
commit6ab486c73d4d5764ac7b63c46e04c361c776385b (patch)
tree4ad0cb1c89dda0ad195255b5610240ad351acb67 /test/MindTest.hs
parentd128c42a96110eceb3a82ff26263388efff20623 (diff)
add createEmptyNetwork
Diffstat (limited to 'test/MindTest.hs')
-rw-r--r--test/MindTest.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/MindTest.hs b/test/MindTest.hs
index 227aa0c..5eb1734 100644
--- a/test/MindTest.hs
+++ b/test/MindTest.hs
@@ -2,15 +2,23 @@ module MindTest (suite) where
import Test.Tasty
import Test.Tasty.HUnit
-
import Mind
suite :: TestTree
suite = testGroup "mind tests" $
[ neuronIndexTests
+ , networkTests
]
neuronIndexTests :: TestTree
neuronIndexTests = testGroup "neuron index tests" $
[ testCase "get input index" $ getNeuronIndex (Input 4) @?= 4
+ , testCase "get internal index" $ getNeuronIndex (Internal 12) @?= 12
+ , testCase "get output index" $ getNeuronIndex (Output 0) @?= 0
+ ]
+
+networkTests :: TestTree
+networkTests = testGroup "network tests" $
+ [ testCase "create empty network" $
+ (createEmptyNetwork 3 2 1) @?= Network 3 [[], []] [[]]
]