1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
From 4a2eb67b4397f6554e23e1ece4f069852dde743e Mon Sep 17 00:00:00 2001
From: Drew Parsons <dparsons@emerall.com>
Date: Sat, 16 Oct 2021 10:46:27 +0200
Subject: [PATCH] relax tolerance in the xlapack.solveCholesky test
The xlapack.solveCholesky test in test_lapack.cpp fails on 32-bit architectures (i386/i686):
[ RUN ] xlapack.solveCholesky
/tmp/autopkgtest-lxc.gg3nslld/downtmp/autopkgtest_tmp/test_lapack.cpp:166: Failure
Expected equality of these values:
x_expected[i]
Which is: 0.13757507429403265
x[i]
Which is: 0.13757507429403248
[ FAILED ] xlapack.solveCholesky (0 ms)
This patch relaxes test tolerance by using EXPECT_NEAR with abstol=2e-16 instead of EXPECT_DOUBLE_EQ.
Fixes Issue #211.
---
test/test_lapack.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: xtensor-blas/test/test_lapack.cpp
===================================================================
--- xtensor-blas.orig/test/test_lapack.cpp 2021-11-22 22:40:02.671700342 +0100
+++ xtensor-blas/test/test_lapack.cpp 2021-11-22 22:40:02.667700319 +0100
@@ -183,7 +183,7 @@
-0.05799057434472885, 0.08606304705465571};
for (int i = 0; i < x_expected.shape()[0]; ++i) {
- EXPECT_DOUBLE_EQ(x_expected[i], x[i]);
+ EXPECT_NEAR(x_expected[i], x[i], 5e-16);
}
}
|