summaryrefslogtreecommitdiff
path: root/packages/tests
diff options
context:
space:
mode:
authoridontgetoutmuch <dominic@steinitz.org>2018-04-01 10:25:45 -0700
committerGitHub <noreply@github.com>2018-04-01 10:25:45 -0700
commit033815c6183da48233dd249abcd232685ecc21cf (patch)
tree903fa549ea33ae9eff9fb527375f87548948d41d /packages/tests
parent63ceed4a69563c08e54269a4a9d3e5d27cb7c489 (diff)
parent7ff1249249cb1b238e3e5ffafdaa9180c86242b9 (diff)
Merge pull request #258 from luntain/master
improve test failures description
Diffstat (limited to 'packages/tests')
-rw-r--r--packages/tests/src/Numeric/LinearAlgebra/Tests.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs
index 2c98c5a..960c777 100644
--- a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs
+++ b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs
@@ -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]]