From 2f0a105e86a904afef5ba340aaa7aa2514a0da57 Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Mon, 23 Jun 2014 22:33:42 +0200 Subject: Split out GSL tests from base ones Move GSL tests into Numeric.GSL.Tests, separate the main into TestBase.hs and TestGSL.hs. In hmatrix-tests.cabal: - Split the test suite into a -base and -gsl ones - Add a `gsl` configuration flag to select GSL tests - Add a benchmark section One can now run hmatrix-base tests suite and benchmarks with: cabal configure --flag=-gsl --enable-tests --enable-benchmarks cabal tests cabal bench --- packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/tests/src/Numeric/LinearAlgebra/Tests') diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs index d6ec957..9bdf897 100644 --- a/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs +++ b/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs @@ -13,7 +13,7 @@ Testing properties. -} module Numeric.LinearAlgebra.Tests.Properties ( - dist, (|~|), (~:), Aprox((:~)), + dist, (|~|), (~~), (~:), Aprox((:~)), zeros, ones, square, unitary, @@ -60,6 +60,8 @@ infixl 4 |~| a |~| b = a :~10~: b --a |~| b = dist a b < 10^^(-10) +a ~~ b = fromList a |~| fromList b + data Aprox a = (:~) a Int -- (~:) :: (Normed a, Num a) => Aprox a -> a -> Bool a :~n~: b = dist a b < 10^^(-n) -- cgit v1.2.3