X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTetrahedron.hs;fp=src%2FTetrahedron.hs;h=e63f96b7d1bc750e4c18c08888a5bf95ecc2f049;hb=a499efdb0e215ac424fe7c38a52430daebefc22b;hp=8e9acd38c8b9a0b858f56287fc8aa0c637fd8beb;hpb=5de566481cadea0f1e258657ee2697ad643b77d5;p=spline3.git diff --git a/src/Tetrahedron.hs b/src/Tetrahedron.hs index 8e9acd3..e63f96b 100644 --- a/src/Tetrahedron.hs +++ b/src/Tetrahedron.hs @@ -16,11 +16,14 @@ where 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 ) @@ -321,7 +324,7 @@ b3 t point = (volume inner_tetrahedron) / (precomputed_volume t) -- | 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 ] @@ -347,7 +350,7 @@ tetrahedron1_geometry_tests = -- | 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 ] @@ -494,17 +497,17 @@ prop_swapping_vertices_doesnt_affect_coefficients4 t = -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] @@ -556,9 +559,9 @@ p78_24_properties = -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,