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 [[], []] [[]] ]