Commit Graph

18 Commits

Author SHA1 Message Date
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
3851e30a48 Fix pango_font_info_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-01-10 23:22:45 +01:00
Egor Pugin
db43bb43dc [test] Init FC early. 2021-01-06 00:30:52 +03:00
Egor Pugin
c86325e2f7 Use TESS_API for every public symbol. Public symbol is exported from the library. This also applies to unit test and training symbols. Users will be limited to public api, but set of exported symbols will be wider still.
Remove TESS_LOCAL.
Fix several symbol issues that made visible with these changes.

All build systems must set -fvisibility-hidden for *nix systems.
2020-12-31 16:32:29 +03:00
Egor Pugin
3a66282e92 Remove GOOGLE_TESSERACT ifdefs. 2020-12-31 14:23:52 +03:00
Stefan Weil
f7d7aa6b95 Make tmp directory for all unit tests
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-12-30 18:17:58 +01:00
Egor Pugin
b7df4bc1dd [test] Create tmp dir in more tests. 2020-12-30 16:44:59 +03: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
00a09c2f42 Force fontconfig pangocairo backend for pango_font_info_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-12-22 21:32:05 +01:00
Stefan Weil
e75b217b37 Enable pango_font_info_test for unit tests
Most parts of that test can now be used without Tensorflow code.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-12-22 08:29:53 +01:00
Stefan Weil
7c4ef88dab Remove unused functions FontUtils::GetAllRenderableCharacters
They used the function pango_coverage_max which does nothing and
which has been deprecated since pango version 1.44.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-10-03 12:04:40 +02:00
Stefan Weil
40c1cf671f unittest: Fix and enable pango_font_info_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-28 08:09:28 +02:00
Stefan Weil
8e7b1119b5 Run more unittests with the user's locale
Hopefully this improves the test coverage.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-16 18:12:55 +02:00
Stefan Weil
7ebd3153ae Fix several typos (most of them found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-12-10 18:59:58 +01: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