From 93a402d0f200f2ac4fb1afce72525a31f1054992 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 19 Mar 2019 15:18:43 +0300 Subject: [PATCH] core: fix Core_EigenNonSymmetric.convergence test --- modules/core/test/test_eigen.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/core/test/test_eigen.cpp b/modules/core/test/test_eigen.cpp index a5b9c3ad1f..6f5d82bf4a 100644 --- a/modules/core/test/test_eigen.cpp +++ b/modules/core/test/test_eigen.cpp @@ -527,7 +527,19 @@ TEST(Core_EigenNonSymmetric, convergence) 0, -1, 0); Mat eigenvalues, eigenvectors; // eigen values are complex, algorithm doesn't converge - EXPECT_THROW(cv::eigenNonSymmetric(m, eigenvalues, eigenvectors), cv::Exception); // exception instead of hang + try + { + cv::eigenNonSymmetric(m, eigenvalues, eigenvectors); + std::cout << Mat(eigenvalues.t()) << std::endl; + } + catch (const cv::Exception& e) + { + EXPECT_EQ(Error::StsNoConv, e.code) << e.what(); + } + catch (...) + { + FAIL() << "Unknown exception has been raised"; + } } }} // namespace