-- center of a cube. In addition to those 26 directions, we also
-- include the interior point and a number of composite types that
-- allow us to perform arithmetic on directions.
-module Cardinal
+--
+module Cardinal (
+ Cardinal(..),
+ cardinal_properties,
+ cardinal_tests,
+ ccwx,
+ ccwy,
+ ccwz,
+ cwx,
+ cwy,
+ cwz )
where
import Control.Monad (liftM, liftM2)
import Prelude hiding (LT)
-
-import Test.HUnit (Assertion, assertEqual)
-import Test.Framework (Test, testGroup)
-import Test.Framework.Providers.HUnit (testCase)
-import Test.Framework.Providers.QuickCheck2 (testProperty)
-
-import Test.QuickCheck (Arbitrary(..), Property, (==>), oneof)
+import Test.Tasty ( TestTree, testGroup )
+import Test.Tasty.HUnit ( Assertion, assertEqual, testCase )
+import Test.Tasty.QuickCheck (
+ Arbitrary(..),
+ Property, (==>),
+ oneof,
+ testProperty )
data Cardinal = F -- ^ Front
(ccwz . ccwz . ccwz . ccwz) c == c
-cardinal_tests :: Test.Framework.Test
+cardinal_tests :: TestTree
cardinal_tests =
- testGroup "Cardinal Tests" [
+ testGroup "Cardinal tests" [
testCase "c-tilde_2100 rotation correct"test_c_tilde_2100_rotation_correct ]
-cardinal_properties :: Test.Framework.Test
+cardinal_properties :: TestTree
cardinal_properties =
let tp = testProperty
in
- testGroup "Cardinal Properties" [
+ testGroup "Cardinal properties" [
tp "ccwx rotation changes direction" prop_ccwx_rotation_changes_direction,
tp "cwx rotation changes direction" prop_cwx_rotation_changes_direction,
tp "ccwy rotation changes direction" prop_ccwy_rotation_changes_direction,