mirror of
https://github.com/maciej-bendkowski/generic-boltzmann-brain.git
synced 2024-08-17 08:30:30 +03:00
Move tests outside of the unit test folder
This commit is contained in:
parent
3931b6cdcc
commit
1ea9de8136
@ -87,11 +87,11 @@ test-suite generic-boltzmann-brain-test
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: Spec.hs
|
||||
other-modules:
|
||||
Test.BuffonMachine
|
||||
Test.Sampler
|
||||
Test.Samplers.BinTree
|
||||
Test.Samplers.Lambda
|
||||
Test.Samplers.Tree
|
||||
Test.Unit.BuffonMachine
|
||||
Test.Unit.Sampler
|
||||
Test.Utils
|
||||
Paths_generic_boltzmann_brain
|
||||
hs-source-dirs:
|
||||
|
@ -1,6 +1,6 @@
|
||||
import qualified Test.BuffonMachine as BuffonMachine
|
||||
import qualified Test.Sampler as Sampler
|
||||
import Test.Tasty (TestTree, defaultMain, testGroup)
|
||||
import qualified Test.Unit.BuffonMachine as BuffonMachine
|
||||
import qualified Test.Unit.Sampler as Sampler
|
||||
|
||||
main :: IO ()
|
||||
main = defaultMain tests
|
||||
@ -10,6 +10,6 @@ tests = testGroup "Unit tests" unitTests
|
||||
|
||||
unitTests :: [TestTree]
|
||||
unitTests =
|
||||
[ BuffonMachine.unitTests
|
||||
, Sampler.unitTests
|
||||
[ BuffonMachine.tests
|
||||
, Sampler.tests
|
||||
]
|
||||
|
@ -1,4 +1,4 @@
|
||||
module Test.Unit.BuffonMachine (unitTests) where
|
||||
module Test.BuffonMachine (tests) where
|
||||
|
||||
import Control.Monad (replicateM)
|
||||
import Data.Boltzmann.BuffonMachine (Distribution (..), choice, evalIO)
|
||||
@ -15,16 +15,16 @@ import Test.Tasty.HUnit (
|
||||
testCase,
|
||||
)
|
||||
|
||||
unitTests :: TestTree
|
||||
unitTests =
|
||||
tests :: TestTree
|
||||
tests =
|
||||
testGroup
|
||||
"BuffonMachine unit tests"
|
||||
"BuffonMachine tests"
|
||||
[choiceTests]
|
||||
|
||||
choiceTests :: TestTree
|
||||
choiceTests =
|
||||
testGroup
|
||||
"Choice unit tests"
|
||||
"Choice tests"
|
||||
[ testCase "[1/2, 1/2] is correctly sampled from" $ do
|
||||
[(0, a), (1, b)] <- choiceTest distributionA 1_000_000
|
||||
a `almostEqual` 0.5
|
@ -1,4 +1,4 @@
|
||||
module Test.Unit.Sampler (unitTests) where
|
||||
module Test.Sampler (tests) where
|
||||
|
||||
import Test.Samplers.BinTree (BinTree)
|
||||
import Test.Samplers.Lambda (BinLambda, Lambda)
|
||||
@ -8,8 +8,8 @@ import Test.Utils (Size (size))
|
||||
import Test.Tasty (TestTree, testGroup)
|
||||
import Test.Tasty.QuickCheck as QC (testProperty)
|
||||
|
||||
unitTests :: TestTree
|
||||
unitTests =
|
||||
tests :: TestTree
|
||||
tests =
|
||||
testGroup
|
||||
"Sampler tests"
|
||||
[ QC.testProperty "BinTree sampler respects size constraints" $
|
Loading…
Reference in New Issue
Block a user