diff --git a/unittest/Makefile.am b/unittest/Makefile.am index ab4e1dd070..e65063f163 100644 --- a/unittest/Makefile.am +++ b/unittest/Makefile.am @@ -20,6 +20,9 @@ AM_CPPFLAGS += -DTESSDATA_BEST_DIR="\"$(TESSDATA_BEST_DIR)\"" AM_CPPFLAGS += -DTESTING_DIR="\"$(TESTING_DIR)\"" AM_CPPFLAGS += -DTESTDATA_DIR="\"$(TESTDATA_DIR)\"" AM_CPPFLAGS += -DPANGO_ENABLE_ENGINE +if DISABLED_LEGACY_ENGINE +AM_CPPFLAGS += -DDISABLED_LEGACY_ENGINE +endif AM_CPPFLAGS += -I$(top_builddir)/src/api AM_CPPFLAGS += -I$(top_srcdir)/src/api AM_CPPFLAGS += -I$(top_srcdir)/src/arch diff --git a/unittest/baseapi_test.cc b/unittest/baseapi_test.cc index b7a1afeb7f..bc70fd0f23 100644 --- a/unittest/baseapi_test.cc +++ b/unittest/baseapi_test.cc @@ -166,6 +166,10 @@ TEST_F(TesseractTest, RickSnyderNotFuckSnyder) { // Tests that Tesseract gets exactly the right answer on some page numbers. TEST_F(TesseractTest, AdaptToWordStrTest) { +#ifdef DISABLED_LEGACY_ENGINE + // Skip test because TessBaseAPI::AdaptToWordStr is missing. + GTEST_SKIP(); +#else static const char* kTrainingPages[] = { "136.tif", "256.tif", "410.tif", "432.tif", "540.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()); pixDestroy(&src_pix); } +#endif } // Tests that LSTM gets exactly the right answer on phototest.