core: fix Core_EigenNonSymmetric.convergence test

pull/14103/head
Alexander Alekhin 6 years ago
parent a7c4ee9ae1
commit 93a402d0f2
  1. 14
      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

Loading…
Cancel
Save