Merge pull request #2440 from stweil/linkfix

Fix linker error for baseapi_test when building without legacy engine
This commit is contained in:
zdenop 2019-05-16 17:31:35 +02:00 committed by GitHub
commit 3864d0d088
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,6 +166,10 @@ TEST_F(TesseractTest, RickSnyderNotFuckSnyder) {
// Tests that Tesseract gets exactly the right answer on some page numbers. // Tests that Tesseract gets exactly the right answer on some page numbers.
TEST_F(TesseractTest, AdaptToWordStrTest) { TEST_F(TesseractTest, AdaptToWordStrTest) {
#ifdef DISABLED_LEGACY_ENGINE
// Skip test because TessBaseAPI::AdaptToWordStr is missing.
GTEST_SKIP();
#else
static const char* kTrainingPages[] = { static const char* kTrainingPages[] = {
"136.tif", "256.tif", "410.tif", "432.tif", "540.tif", "136.tif", "256.tif", "410.tif", "432.tif", "540.tif",
"692.tif", "779.tif", "793.tif", "808.tif", "815.tif", "692.tif", "779.tif", "793.tif", "808.tif", "815.tif",
@ -204,6 +208,7 @@ TEST_F(TesseractTest, AdaptToWordStrTest) {
EXPECT_STREQ(kTestText[i], ocr_text.c_str()); EXPECT_STREQ(kTestText[i], ocr_text.c_str());
pixDestroy(&src_pix); pixDestroy(&src_pix);
} }
#endif
} }
// Tests that LSTM gets exactly the right answer on phototest. // Tests that LSTM gets exactly the right answer on phototest.