module Bayes.Test (
runTests
) where
import Test.Framework (defaultMain, testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.Framework.Providers.HUnit(testCase)
import Bayes.Test.CompareEliminations(compareVariableFactor)
import Bayes(testEdgeRemoval_prop,testVertexRemoval_prop)
import Bayes.Factor(testProductProject_prop,testScale_prop,testProjectCommut_prop,testScalarProduct_prop,testProjectionToScalar_prop)
import Bayes.FactorElimination(junctionTreeProperty_prop)
runTests = defaultMain tests
tests = [
testGroup "Graph" [
testProperty "Edge Removal" testEdgeRemoval_prop,
testProperty "Vertex Removal" testVertexRemoval_prop
]
, testGroup "Factor" [
testProperty "Factor scaling and norm" testScale_prop,
testProperty "Product / Project" testProductProject_prop,
testProperty "Commutativity of project" testProjectCommut_prop,
testProperty "Product with scalar factor" testScalarProduct_prop,
testProperty "Test projection to scalar" testProjectionToScalar_prop
]
, testGroup "Junction Tree" [
testProperty "Test the junction tree property" junctionTreeProperty_prop,
testCase "Test variable elimination == factor elimination" compareVariableFactor
]
]