Added interface to check library version during runtime

This commit is contained in:
Maksim Shabunin
2018-04-06 13:13:53 +03:00
parent 875b4e212a
commit d2cff38db6
5 changed files with 50 additions and 8 deletions
+10
View File
@@ -189,4 +189,14 @@ TEST(Core_Parallel, propagate_exceptions)
}, cv::Exception);
}
TEST(Core_Version, consistency)
{
// this test verifies that OpenCV version loaded in runtime
// is the same this test has been built with
EXPECT_EQ(CV_VERSION_MAJOR, cv::getVersionMajor());
EXPECT_EQ(CV_VERSION_MINOR, cv::getVersionMinor());
EXPECT_EQ(CV_VERSION_REVISION, cv::getVersionRevision());
EXPECT_EQ(String(CV_VERSION), cv::getVersionString());
}
}} // namespace