Skip to content

Commit 4a2eb67

Browse files
authored
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 xtensor-stack#211.
1 parent 0aee299 commit 4a2eb67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_lapack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ namespace xt
163163
-1.3449222878385465 , -1.81183493755905478};
164164

165165
for (int i = 0; i < x_expected.shape()[0]; ++i) {
166-
EXPECT_DOUBLE_EQ(x_expected[i], x[i]);
166+
EXPECT_NEAR(x_expected[i], x[i], 2e-16);
167167
}
168168
}
169169

0 commit comments

Comments
 (0)