summaryrefslogtreecommitdiff
path: root/packages/tests/src/Numeric/LinearAlgebra
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2015-07-22 19:34:00 +0200
committerAlberto Ruiz <aruiz@um.es>2015-07-22 19:34:00 +0200
commitf59617b712cb610edaf630b186d00b33bd37a375 (patch)
tree82ae9187ee3d0a61954c7c2dea87106411e37f5f /packages/tests/src/Numeric/LinearAlgebra
parent233e419a2a48eb53e05370e5aa898608716ca114 (diff)
parent998f5710d43e860987f43217ca57a5721e3eabb0 (diff)
Merge pull request #140 from peddie/unittests
Unit tests for interpolation and simulated annealing modules
Diffstat (limited to 'packages/tests/src/Numeric/LinearAlgebra')
-rw-r--r--packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs5
1 files changed, 4 insertions, 1 deletions
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.
14-} 14-}
15 15
16module Numeric.LinearAlgebra.Tests.Properties ( 16module Numeric.LinearAlgebra.Tests.Properties (
17 dist, (|~|), (~~), (~:), Aprox((:~)), 17 dist, (|~|), (~~), (~:), Aprox((:~)), (~=),
18 zeros, ones, 18 zeros, ones,
19 square, 19 square,
20 unitary, 20 unitary,
@@ -45,6 +45,9 @@ module Numeric.LinearAlgebra.Tests.Properties (
45import Numeric.LinearAlgebra.HMatrix hiding (Testable,unitary) 45import Numeric.LinearAlgebra.HMatrix hiding (Testable,unitary)
46import Test.QuickCheck 46import Test.QuickCheck
47 47
48(~=) :: Double -> Double -> Bool
49a ~= b = abs (a - b) < 1e-10
50
48trivial :: Testable a => Bool -> a -> Property 51trivial :: Testable a => Bool -> a -> Property
49trivial = (`classify` "trivial") 52trivial = (`classify` "trivial")
50 53