mirror of
https://github.com/maciej-bendkowski/generic-boltzmann-brain.git
synced 2024-09-11 12:48:09 +03:00
Numeric underscores in tests
This commit is contained in:
parent
79216f69b5
commit
66feb60074
@ -176,7 +176,7 @@ test-suite generic-boltzmann-brain-test
|
|||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
test
|
test
|
||||||
default-extensions:
|
default-extensions:
|
||||||
LambdaCase BangPatterns DerivingVia FlexibleInstances UndecidableInstances TypeApplications ScopedTypeVariables Rank2Types
|
NumericUnderscores LambdaCase BangPatterns DerivingVia FlexibleInstances UndecidableInstances TypeApplications ScopedTypeVariables Rank2Types
|
||||||
ghc-options: -O2 -Wall -Wcompat -Wmissing-export-lists -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -Wno-name-shadowing -fwarn-missing-signatures
|
ghc-options: -O2 -Wall -Wcompat -Wmissing-export-lists -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -Wno-name-shadowing -fwarn-missing-signatures
|
||||||
build-depends:
|
build-depends:
|
||||||
QuickCheck >=2.14.2
|
QuickCheck >=2.14.2
|
||||||
|
@ -185,6 +185,7 @@ tests:
|
|||||||
- tasty-quickcheck >= 0.10.0
|
- tasty-quickcheck >= 0.10.0
|
||||||
- QuickCheck >= 2.14.2
|
- QuickCheck >= 2.14.2
|
||||||
default-extensions:
|
default-extensions:
|
||||||
|
NumericUnderscores
|
||||||
LambdaCase
|
LambdaCase
|
||||||
BangPatterns
|
BangPatterns
|
||||||
DerivingVia
|
DerivingVia
|
||||||
|
@ -26,21 +26,21 @@ choiceTests =
|
|||||||
testGroup
|
testGroup
|
||||||
"Choice unit tests"
|
"Choice unit tests"
|
||||||
[ testCase "[1/2, 1/2] is correctly sampled from" $ do
|
[ testCase "[1/2, 1/2] is correctly sampled from" $ do
|
||||||
[(0, a), (1, b)] <- choiceTest distributionA 1000000
|
[(0, a), (1, b)] <- choiceTest distributionA 1_000_000
|
||||||
a `almostEqual` 0.5
|
a `almostEqual` 0.5
|
||||||
b `almostEqual` 0.5
|
b `almostEqual` 0.5
|
||||||
, testCase "[1/3, 1/3, 1/3] is correctly sampled from" $ do
|
, testCase "[1/3, 1/3, 1/3] is correctly sampled from" $ do
|
||||||
[(0, a), (1, b), (2, c)] <- choiceTest distributionB 1000000
|
[(0, a), (1, b), (2, c)] <- choiceTest distributionB 1_000_000
|
||||||
a `almostEqual` 0.33
|
a `almostEqual` 0.33
|
||||||
b `almostEqual` 0.33
|
b `almostEqual` 0.33
|
||||||
c `almostEqual` 0.33
|
c `almostEqual` 0.33
|
||||||
, testCase "[1/7, 4/7, 2/7] is correctly sampled from" $ do
|
, testCase "[1/7, 4/7, 2/7] is correctly sampled from" $ do
|
||||||
[(0, a), (1, b), (2, c)] <- choiceTest distributionC 1000000
|
[(0, a), (1, b), (2, c)] <- choiceTest distributionC 1_000_000
|
||||||
a `almostEqual` 0.14
|
a `almostEqual` 0.14
|
||||||
b `almostEqual` 0.57
|
b `almostEqual` 0.57
|
||||||
c `almostEqual` 0.28
|
c `almostEqual` 0.28
|
||||||
, testCase "[1/1] is correctly sampled from" $ do
|
, testCase "[1/1] is correctly sampled from" $ do
|
||||||
[(0, a)] <- choiceTest distributionD 1000000
|
[(0, a)] <- choiceTest distributionD 1_000_000
|
||||||
a `almostEqual` 1.0
|
a `almostEqual` 1.0
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user