Stefan Weil
49f410ced3
unittest: Remove dependency on absl::StripAsciiWhitespace()
...
This removes the last dependency on Abseil, so that submodule
is now removed completely.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-08-06 20:59:10 +02:00
Stefan Weil
61b8e301dd
unittest: Remove dependency on absl::StrCat()
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-08-06 20:59:09 +02:00
Stefan Weil
c9f42ce62b
Add unittest for static TessBaseAPI object ( #3509 )
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-25 14:34:43 +03:00
Egor Pugin
a792b67983
Basic usage of new Image class. Only pixDestroy is wrapped at the moment.
...
Add new methods to Image class and replace them in non-public code.
2021-03-31 22:39:43 +03:00
Stefan Weil
fbaac9dc9d
Modernize code (clang-tidy -checks='-*,google-readability-braces-around-statements')
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-22 09:03:51 +01:00
Stefan Weil
2a83c4a898
Modernize code (clang-tidy -checks='-*,modernize-use-emplace')
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-22 09:02:57 +01:00
Stefan Weil
77ed2886a7
Modernize code (clang-tidy -checks='-*,modernize-loop-convert')
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-22 09:02:51 +01:00
Egor Pugin
bcebf04f8e
[unittest] Use more smart ptrs, more std::make_unique instead of .reset(new T()).
2021-03-14 23:06:19 +03:00
Egor Pugin
1d5b083447
[clang-format] Format unit tests.
2021-03-13 00:06:34 +03:00
Stefan Weil
0b8e937655
Use countof to get number of array elements
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-02-23 20:20:48 +01:00
Stefan Weil
bc69e28de3
Update include statements for external header file allheaders.h
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-02-13 10:17:20 +01:00
Shree Devi Kumar
4df7021d98
Remove unnecessary subtest with missing input image
2021-01-14 15:38:55 +01:00
Egor Pugin
694f0097fd
Fix baseapi test. Use C++ regex instead of gtest ones.
2020-12-30 01:28:50 +03:00
Stefan Weil
fec9c11c8c
Use std::vector, std::string in baseapi.h
...
Signed-off-by: Stefan Weil <sw@weil.de>
2020-12-28 21:03:29 +01:00
Stefan Weil
a61d7ac2ee
Add / fix namespace tesseract for unittest
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-12-27 10:54:43 +01:00
Stefan Weil
9173e6e3f7
Add TessBaseAPI::GetPageRes again
...
It is now added unconditionally, so it is always available for the unittest.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-05-04 14:03:39 +02:00
Stefan Weil
e3e7a9bf33
Use #include <tesseract/*.h> for unittest
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-10-29 18:01:18 +01:00
Stefan Weil
26ba7e2f81
Fix #include path of public headers for unittest
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-10-29 08:41:47 +01:00
Stefan Weil
bce585286d
Remove global array kPolyBlockNames from Tesseract library
...
It is only used in unittest/layout_test.cc after moving a test from
baseapi_test.cc to that file, so it can be made local.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-08-12 14:33:55 +02:00
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