X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTests%2FFunctionValues.hs;h=9cada35a30c670723af1e1c26f06a8a90b1fe834;hb=ecb77f944fcba8c8cfe60ca782bc5d9c8ab68cf9;hp=3dc38a49764507d0f66e9b00eebb6c4e0d82d564;hpb=2c2dbf7c58850f3b8294457ca8f4adf9474c7ce7;p=spline3.git diff --git a/src/Tests/FunctionValues.hs b/src/Tests/FunctionValues.hs index 3dc38a4..9cada35 100644 --- a/src/Tests/FunctionValues.hs +++ b/src/Tests/FunctionValues.hs @@ -2,76 +2,14 @@ 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 equalities = [ interior fvs == 4, @@ -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]