mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-13 07:59:04 +08:00
Merge pull request #1681 from Shreeshrii/master
minor changes to unittests
This commit is contained in:
commit
29f280e470
2
.gitignore
vendored
2
.gitignore
vendored
@ -103,6 +103,8 @@ kernel*.bin
|
||||
/unittest/matrix_test
|
||||
/unittest/osd_test
|
||||
/unittest/tesseracttests
|
||||
/unittest/progress_test
|
||||
/unittest/loadlang_test
|
||||
|
||||
# generated files from unlvtests
|
||||
times.txt
|
||||
|
@ -69,17 +69,39 @@ class QuickTest : public testing::Test {
|
||||
TESTING_DIR "/phototest.txt",
|
||||
TESSDATA_DIR "_fast", GetParam());
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P( EngLatinDevaArabLang, MatchGroundTruth,
|
||||
::testing::Values("eng", "script/Latin", "script/Devanagari", "script/Arabic") );
|
||||
|
||||
TEST_P(MatchGroundTruth, BestPhototestOCR) {
|
||||
OCRTester(TESTING_DIR "/phototest.tif",
|
||||
TESTING_DIR "/phototest.txt",
|
||||
TESSDATA_DIR "_best", GetParam());
|
||||
}
|
||||
|
||||
TEST_P(MatchGroundTruth, TessPhototestOCR) {
|
||||
OCRTester(TESTING_DIR "/phototest.tif",
|
||||
TESTING_DIR "/phototest.txt",
|
||||
TESSDATA_DIR , GetParam());
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P( Eng, MatchGroundTruth,
|
||||
::testing::Values("eng") );
|
||||
INSTANTIATE_TEST_CASE_P( Latin, MatchGroundTruth,
|
||||
::testing::Values("script/Latin") );
|
||||
INSTANTIATE_TEST_CASE_P( Deva, MatchGroundTruth,
|
||||
::testing::Values("script/Devanagari") );
|
||||
INSTANTIATE_TEST_CASE_P( Arab, MatchGroundTruth,
|
||||
::testing::Values("script/Arabic") );
|
||||
|
||||
class EuroText : public QuickTest {
|
||||
};
|
||||
|
||||
TEST_F(EuroText, FastOCR) {
|
||||
TEST_F(EuroText, FastLatinOCR) {
|
||||
OCRTester(TESTING_DIR "/eurotext.tif",
|
||||
TESTING_DIR "/eurotext.txt",
|
||||
TESSDATA_DIR "_fast", "script/Latin");
|
||||
}
|
||||
|
||||
// script/Latin for eurotext.tif does not match groundtruth
|
||||
// for tessdata & tessdata_best
|
||||
// so do not test these here.
|
||||
|
||||
} // namespace
|
||||
|
Loading…
Reference in New Issue
Block a user