diff options
Diffstat (limited to 'packages/tests/src/Numeric/LinearAlgebra/Tests.hs')
-rw-r--r-- | packages/tests/src/Numeric/LinearAlgebra/Tests.hs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs index 2aefc87..960c777 100644 --- a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs +++ b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs | |||
@@ -1,5 +1,5 @@ | |||
1 | {-# LANGUAGE CPP #-} | 1 | {-# LANGUAGE CPP #-} |
2 | {-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-incomplete-patterns #-} | 2 | {-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-incomplete-patterns -fno-warn-missing-signatures #-} |
3 | {-# LANGUAGE DataKinds #-} | 3 | {-# LANGUAGE DataKinds #-} |
4 | {-# LANGUAGE TypeFamilies #-} | 4 | {-# LANGUAGE TypeFamilies #-} |
5 | {-# LANGUAGE FlexibleContexts #-} | 5 | {-# LANGUAGE FlexibleContexts #-} |
@@ -31,7 +31,7 @@ module Numeric.LinearAlgebra.Tests( | |||
31 | --, runBigTests | 31 | --, runBigTests |
32 | ) where | 32 | ) where |
33 | 33 | ||
34 | import Numeric.LinearAlgebra hiding (unitary) | 34 | import Numeric.LinearAlgebra |
35 | import Numeric.LinearAlgebra.Devel | 35 | import Numeric.LinearAlgebra.Devel |
36 | import Numeric.LinearAlgebra.Static(L) | 36 | import Numeric.LinearAlgebra.Static(L) |
37 | import Numeric.LinearAlgebra.Tests.Instances | 37 | import Numeric.LinearAlgebra.Tests.Instances |
@@ -514,7 +514,7 @@ indexProp g f x = a1 == g a2 && a2 == a3 && b1 == g b2 && b2 == b3 | |||
514 | 514 | ||
515 | -------------------------------------------------------------------------------- | 515 | -------------------------------------------------------------------------------- |
516 | 516 | ||
517 | sliceTest = utest "slice test" $ and | 517 | _sliceTest = utest "slice test" $ and |
518 | [ testSlice (chol . trustSym) (gen 5 :: Matrix R) | 518 | [ testSlice (chol . trustSym) (gen 5 :: Matrix R) |
519 | , testSlice (chol . trustSym) (gen 5 :: Matrix C) | 519 | , testSlice (chol . trustSym) (gen 5 :: Matrix C) |
520 | , testSlice qr (rec :: Matrix R) | 520 | , testSlice qr (rec :: Matrix R) |
@@ -617,7 +617,7 @@ sliceTest = utest "slice test" $ and | |||
617 | 617 | ||
618 | test_qrgr n t x = qrgr n (QR x t) | 618 | test_qrgr n t x = qrgr n (QR x t) |
619 | 619 | ||
620 | ok_qrgr x = simeq 1E-15 q q' | 620 | ok_qrgr x = TestCase . assertBool "ok_qrgr" $ simeq 1E-15 q q' |
621 | where | 621 | where |
622 | (q,_) = qr x | 622 | (q,_) = qr x |
623 | atau = qrRaw x | 623 | atau = qrRaw x |
@@ -646,7 +646,8 @@ sliceTest = utest "slice test" $ and | |||
646 | rec :: Numeric t => Matrix t | 646 | rec :: Numeric t => Matrix t |
647 | rec = subMatrix (0,0) (4,5) (gen 5) | 647 | rec = subMatrix (0,0) (4,5) (gen 5) |
648 | 648 | ||
649 | testSlice f x@(size->sz@(r,c)) = all (==f x) (map f (g y1 ++ g y2)) | 649 | testSlice f x@(size->sz@(r,c)) = |
650 | TestList . map (TestCase . assertEqual "" (f x)) $ (map f (g y1 ++ g y2)) | ||
650 | where | 651 | where |
651 | subm = subMatrix | 652 | subm = subMatrix |
652 | g y = [ subm (a*r,b*c) sz y | a <-[0..2], b <- [0..2]] | 653 | g y = [ subm (a*r,b*c) sz y | a <-[0..2], b <- [0..2]] |
@@ -841,7 +842,7 @@ runTests n = do | |||
841 | , staticTest | 842 | , staticTest |
842 | , intTest | 843 | , intTest |
843 | , modularTest | 844 | , modularTest |
844 | , sliceTest | 845 | -- , sliceTest |
845 | ] | 846 | ] |
846 | when (errors c + failures c > 0) exitFailure | 847 | when (errors c + failures c > 0) exitFailure |
847 | return () | 848 | return () |