Skip to content

Commit cdac7c7

Browse files
committed
Add test checking we don't throw when creating GenericIndex with LshIndexParams()
1 parent fe09c79 commit cdac7c7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/flann/test/test_lshtable_badarg.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,10 @@ void CV_LshTableBadArgTest::run( int /* start_from */ )
9090

9191
TEST(Flann_LshTable, badarg) { CV_LshTableBadArgTest test; test.safe_run(); }
9292

93+
TEST(Flann_LshTable, bad_any_cast) {
94+
Mat features = Mat::ones(1, 64, CV_8U);
95+
EXPECT_NO_THROW(flann::GenericIndex<cvflann::Hamming2<unsigned char> >(
96+
features, cvflann::LshIndexParams()));
97+
}
98+
9399
}} // namespace

0 commit comments

Comments
 (0)