Add test checking we don't throw when creating GenericIndex with LshIndexParams()

This commit is contained in:
Pierre-Emmanuel Viel 2020-06-28 16:55:50 +02:00
parent fe09c79f4b
commit cdac7c7bec

View File

@ -90,4 +90,10 @@ void CV_LshTableBadArgTest::run( int /* start_from */ )
TEST(Flann_LshTable, badarg) { CV_LshTableBadArgTest test; test.safe_run(); }
TEST(Flann_LshTable, bad_any_cast) {
Mat features = Mat::ones(1, 64, CV_8U);
EXPECT_NO_THROW(flann::GenericIndex<cvflann::Hamming2<unsigned char> >(
features, cvflann::LshIndexParams()));
}
}} // namespace