From f6a23683ae87810b8673c069eda4a8c0958ce84f Mon Sep 17 00:00:00 2001 From: Matthew Peddie Date: Wed, 22 Jul 2015 20:42:38 +1000 Subject: Add unit tests for GSL interpolation module --- packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'packages/tests/src/Numeric/LinearAlgebra') diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs index 720b7bd..046644f 100644 --- a/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs +++ b/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs @@ -14,7 +14,7 @@ Testing properties. -} module Numeric.LinearAlgebra.Tests.Properties ( - dist, (|~|), (~~), (~:), Aprox((:~)), + dist, (|~|), (~~), (~:), Aprox((:~)), (~=), zeros, ones, square, unitary, @@ -45,6 +45,9 @@ module Numeric.LinearAlgebra.Tests.Properties ( import Numeric.LinearAlgebra.HMatrix hiding (Testable,unitary) import Test.QuickCheck +(~=) :: Double -> Double -> Bool +a ~= b = abs (a - b) < 1e-10 + trivial :: Testable a => Bool -> a -> Property trivial = (`classify` "trivial") -- cgit v1.2.3