import Data.Vector ( singleton, snoc )
import qualified Data.Vector as V ( sum )
-import Test.Framework ( Test, testGroup )
-import Test.Framework.Providers.HUnit ( testCase )
-import Test.Framework.Providers.QuickCheck2 ( testProperty )
-import Test.HUnit (Assertion, assertEqual)
-import Test.QuickCheck ( Arbitrary(..), Gen, Property, (==>) )
+import Test.Tasty ( TestTree, testGroup )
+import Test.Tasty.HUnit ( Assertion, assertEqual, testCase )
+import Test.Tasty.QuickCheck (
+ Arbitrary(..),
+ Gen,
+ Property,
+ (==>),
+ testProperty )
import Comparisons ( (~=) )
import FunctionValues ( FunctionValues(..), empty_values )
-- | Check the volume of a particular tetrahedron (computed by hand)
-- Its vertices are in clockwise order, so the volume should be
-- negative.
-tetrahedron1_geometry_tests :: Test.Framework.Test
+tetrahedron1_geometry_tests :: TestTree
tetrahedron1_geometry_tests =
testGroup "tetrahedron1 geometry"
[ testCase "volume1" volume1 ]
-- | Check the volume of a particular tetrahedron (computed by hand)
-- Its vertices are in counter-clockwise order, so the volume should
-- be positive.
-tetrahedron2_geometry_tests :: Test.Framework.Test
+tetrahedron2_geometry_tests :: TestTree
tetrahedron2_geometry_tests =
testGroup "tetrahedron2 geometry"
[ testCase "volume1" volume1 ]
-tetrahedron_tests :: Test.Framework.Test
+tetrahedron_tests :: TestTree
tetrahedron_tests =
- testGroup "Tetrahedron Tests" [
+ testGroup "Tetrahedron tests" [
tetrahedron1_geometry_tests,
tetrahedron2_geometry_tests ]
-p78_24_properties :: Test.Framework.Test
+p78_24_properties :: TestTree
p78_24_properties =
- testGroup "p. 78, Section (2.4) Properties" [
+ testGroup "p. 78, Section (2.4) properties" [
testProperty "c3000 identity" prop_c3000_identity,
testProperty "c2100 identity" prop_c2100_identity,
testProperty "c1110 identity" prop_c1110_identity]
-tetrahedron_properties :: Test.Framework.Test
+tetrahedron_properties :: TestTree
tetrahedron_properties =
- testGroup "Tetrahedron Properties" [
+ testGroup "Tetrahedron properties" [
p78_24_properties,
testProperty "b0_v0_always_unity" prop_b0_v0_always_unity,
testProperty "b0_v1_always_zero" prop_b0_v1_always_zero,