From 6ab486c73d4d5764ac7b63c46e04c361c776385b Mon Sep 17 00:00:00 2001 From: sanine Date: Tue, 21 Nov 2023 10:35:07 -0600 Subject: add createEmptyNetwork --- test/MindTest.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'test') 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 [[], []] [[]] ] -- cgit v1.2.1