]> gitweb.michael.orlitzky.com - spline3.git/blobdiff - src/Tests/FunctionValues.hs
Start converting the tests to Repa.
[spline3.git] / src / Tests / FunctionValues.hs
index 3dc38a49764507d0f66e9b00eebb6c4e0d82d564..e14da7b5847baf2822db0366b966b855a98e04d3 100644 (file)
@@ -2,78 +2,16 @@ module Tests.FunctionValues
 where
 
 import Test.HUnit
-import Test.QuickCheck
 
 import Assertions
 import Examples
 import FunctionValues
 
-instance Arbitrary FunctionValues where
-    arbitrary = do
-      front'  <- arbitrary :: Gen Double
-      back'   <- arbitrary :: Gen Double
-      left'   <- arbitrary :: Gen Double
-      right'  <- arbitrary :: Gen Double
-      top'    <- arbitrary :: Gen Double
-      down'   <- arbitrary :: Gen Double
-      front_left' <- arbitrary :: Gen Double
-      front_right' <- arbitrary :: Gen Double
-      front_top' <- arbitrary :: Gen Double
-      front_down' <- arbitrary :: Gen Double
-      back_left' <- arbitrary :: Gen Double
-      back_right' <- arbitrary :: Gen Double
-      back_top' <- arbitrary :: Gen Double
-      back_down' <- arbitrary :: Gen Double
-      left_top' <- arbitrary :: Gen Double
-      left_down' <- arbitrary :: Gen Double
-      right_top' <- arbitrary :: Gen Double
-      right_down' <- arbitrary :: Gen Double
-      front_left_top' <- arbitrary :: Gen Double
-      front_left_down' <- arbitrary :: Gen Double
-      front_right_top' <- arbitrary :: Gen Double
-      front_right_down' <- arbitrary :: Gen Double
-      back_left_top' <- arbitrary :: Gen Double
-      back_left_down' <- arbitrary :: Gen Double
-      back_right_top' <- arbitrary :: Gen Double
-      back_right_down' <- arbitrary :: Gen Double
-      interior' <- arbitrary :: Gen Double
-
-      return empty_values { front = front',
-                            back  = back',
-                            left  = left',
-                            right = right',
-                            top   = top',
-                            down  = down',
-                            front_left = front_left',
-                            front_right = front_right',
-                            front_top = front_top',
-                            front_down = front_down',
-                            back_left = back_left',
-                            back_right = back_right',
-                            back_top = back_top',
-                            back_down = back_down',
-                            left_top = left_top',
-                            left_down = left_down',
-                            right_top = right_top',
-                            right_down = right_down',
-                            front_left_top = front_left_top',
-                            front_left_down = front_left_down',
-                            front_right_top = front_right_top',
-                            front_right_down = front_right_down',
-                            back_left_top = back_left_top',
-                            back_left_down = back_left_down',
-                            back_right_top = back_right_top',
-                            back_right_down = back_right_down',
-                            interior = interior' }
-
-
-
-
-test_directions :: Test
+test_directions :: Assertion
 test_directions =
-    TestCase $ assertTrue "all direction functions work" (and equalities)
+    assertTrue "all direction functions work" (and equalities)
         where
-          fvs = make_values trilinear 1 1 1
+          fvs = make_values trilinear_repa 1 1 1
           equalities = [ interior fvs == 4,
                          front fvs == 1,
                          back  fvs == 7,
@@ -101,6 +39,3 @@ test_directions =
                          back_left_top fvs == 3,
                          back_right_down fvs == 7,
                          back_right_top fvs == 15]
-
-function_values_tests :: [Test]
-function_values_tests = [test_directions]