Commit Graph

15 Commits

Author SHA1 Message Date
Stefan Weil
e0ce040832 Replace remaining STRING by std::string in src/classify
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-15 09:11:41 +01:00
Egor Pugin
1d5b083447 [clang-format] Format unit tests. 2021-03-13 00:06:34 +03: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
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
8137cf35a6 Use const char* for filename parameters
This replaces the proprietary STRING data type
(801 instead of 838 lines remaining).

It also removes STRING from osdetect.h and serialis.h.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-07-07 14:20:09 +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
eec9c96767 Remove member functions STRING::string and StringParam::string (continued)
Commit 994ec697d8 did not update unittest.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-09-25 10:07:51 +02:00
Stefan Weil
9551c3d413 unittest: Remove unused methods
This fixes compiler warnings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-26 20:27:21 +02:00
Stefan Weil
86b0f3625e unittest: Skip test is traineddata is missing in applybox_test
Many tests have preconditions like a correct version of the test submodule
or installed traineddata files at the right location. They fail or even
crash if those preconditions are not met.

The latest version of Googletest supports skipping single tests with
GTEST_SKIP which is used here to skip tests in applybox_test when
tessdata/eng.traineddata is missing.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-24 16:10:52 +01:00
Stefan Weil
98843e0d81 Fix uninitialized scalar variable (CID 1395880)
This fixes a warning from Coverity Scan.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-16 16:53:24 +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
46f65bf0c2 unittest: Fix and enable applybox_test
It needs an update of the test submodule.

The tests only pass with a small modification of the ground truth texts
(kTruthTextWords, kTruthTextLine).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-28 21:03:49 +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