Commit Graph

8 Commits

Author SHA1 Message Date
Stefan Weil
655ba7af10 unittest: Fix compiler warnings (signed/unsigned)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-28 08:11:42 +02:00
Stefan Weil
ceabab8373 unittest: Catch missing eng.traineddata in baseapi_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 08:11:16 +02:00
Stefan Weil
59e31e958b Fix more build error for compilation without legacy engine
Skip the tests which need the legacy code.
Add also code to those tests to use the user's locale to test that, too.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-16 18:12:55 +02:00
Stefan Weil
780986ebfb Fix linker error for baseapi_test when building without legacy engine
Linker error reported in issue #2439:

    unittest/baseapi_test.cc:190:
      undefined reference to
      `tesseract::TessBaseAPI::AdaptToWordStr(tesseract::PageSegMode, char const*)'

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-16 18:12:55 +02:00
Stefan Weil
11f82f5c1e unittest: Add baseapi_test
* Add Abseil sources to build process.

* Add copyright comment.

* InitConfigOnlyTest no longer tests
  hin.traineddata because it is LSTM only.

* Fix std::string.

* Deactivate tests with missing test data.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-11 22:18:58 +02:00
Stefan Weil
4ec9c86226 unittest: Replace NULL by nullptr
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-09-29 09:27:12 +02:00
Stefan Weil
9e66fb918f unittest: Format code
It was formatted with clang-format-7 -i unittest/*.{c*,h}.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-09-29 09:19:13 +02:00
Stefan Weil
2b7df59187 Add more unittests from Google
They were provided by Jeff Breidenbach <jbreiden@google.com>.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00