diff options
author | Alberto Ruiz <aruiz@um.es> | 2015-07-22 19:34:00 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2015-07-22 19:34:00 +0200 |
commit | f59617b712cb610edaf630b186d00b33bd37a375 (patch) | |
tree | 82ae9187ee3d0a61954c7c2dea87106411e37f5f /packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs | |
parent | 233e419a2a48eb53e05370e5aa898608716ca114 (diff) | |
parent | 998f5710d43e860987f43217ca57a5721e3eabb0 (diff) |
Merge pull request #140 from peddie/unittests
Unit tests for interpolation and simulated annealing modules
Diffstat (limited to 'packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs')
-rw-r--r-- | packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs | 5 |
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 | ||
16 | module Numeric.LinearAlgebra.Tests.Properties ( | 16 | module 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 ( | |||
45 | import Numeric.LinearAlgebra.HMatrix hiding (Testable,unitary) | 45 | import Numeric.LinearAlgebra.HMatrix hiding (Testable,unitary) |
46 | import Test.QuickCheck | 46 | import Test.QuickCheck |
47 | 47 | ||
48 | (~=) :: Double -> Double -> Bool | ||
49 | a ~= b = abs (a - b) < 1e-10 | ||
50 | |||
48 | trivial :: Testable a => Bool -> a -> Property | 51 | trivial :: Testable a => Bool -> a -> Property |
49 | trivial = (`classify` "trivial") | 52 | trivial = (`classify` "trivial") |
50 | 53 | ||