module Tests.FunctionValues
where
+import Test.HUnit
import Test.QuickCheck
+import Assertions
+import Examples
import FunctionValues
instance Arbitrary FunctionValues where
back_right_top = back_right_top',
back_right_down = back_right_down',
interior = interior' }
+
+
+
+
+test_directions :: Test
+test_directions =
+ TestCase $ assertTrue "all direction functions work" (and equalities)
+ where
+ fvs = make_values trilinear 1 1 1
+ equalities = [ interior fvs == 4,
+ front fvs == 1,
+ back fvs == 7,
+ left fvs == 2,
+ right fvs == 6,
+ down fvs == 3,
+ top fvs == 5,
+ front_left fvs == 1,
+ front_right fvs == 1,
+ front_down fvs == 1,
+ front_top fvs == 1,
+ back_left fvs == 3,
+ back_right fvs == 11,
+ back_down fvs == 5,
+ back_top fvs == 9,
+ left_down fvs == 2,
+ left_top fvs == 2,
+ right_down fvs == 4,
+ right_top fvs == 8,
+ front_left_down fvs == 1,
+ front_left_top fvs == 1,
+ front_right_down fvs == 1,
+ front_right_top fvs == 1,
+ back_left_down fvs == 3,
+ back_left_top fvs == 3,
+ back_right_down fvs == 7,
+ back_right_top fvs == 15]
+
+function_values_tests :: [Test]
+function_values_tests = [test_directions]
import Tests.Cardinal
import Tests.Cube as TC
+import Tests.FunctionValues
import Tests.Grid
import Tests.Misc
import Tests.Tetrahedron as TT
-- The list of HUnit tests.
-test_suite = TestList (concat [grid_tests,
+test_suite = TestList (concat [function_values_tests,
+ grid_tests,
misc_tests,
tetrahedron_tests])