Stefan Weil
6be58e54fa
Initialize variables in initialization list
...
This fixes several performance issues reported by Coverity:
Variable 'master_trainer_' is assigned in constructor body.
Consider performing initialization in initialization list.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-08-26 13:16:09 +02:00
Stefan Weil
638045133f
Simplify function LoadTrainingData and fix mastertrainer_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-09-17 08:24:50 +02:00
Stefan Weil
87707bb8b0
unittest: Remove dependency on absl::StrSplit()
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-08-06 20:59:09 +02:00
Stefan Weil
6b8b1f0007
unittest: Remove some dependencies on abseil
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-08-06 20:59:09 +02: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
49d4afca63
Modernize code (clang-tidy -checks='-*,modernize-use-equals-*')
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-22 09:02:57 +01:00
Stefan Weil
cb80eb6963
Modernize code (clang-tidy -checks='-*,modernize-use-override')
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-22 09:02:13 +01:00
Stefan Weil
576c09bf31
Replace remaining STRING by std::string in unittest
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-15 09:11:41 +01:00
Stefan Weil
0edd69eb10
Replace remaining STRING by std::string in src/training
...
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
139d127ff7
Remove unneeded include statement for genericvector.h
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-01-23 17:29:57 +01:00
Stefan Weil
5a3d6e5e0d
Fix memory leak in mastertrainer_test (fixes issue #3215 )
...
The issue was introduced in commit 6e9456415
.
Partially reverting this commit fixes it.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-01-23 14:54:38 +01:00
Egor Pugin
6e94564152
[training] More unique ptrs.
2021-01-05 17:03:26 +03:00
Egor Pugin
4415209fd6
Remove tessopt. This fixes mastertrainer test in shared build.
2021-01-05 17:00:27 +03:00
Egor Pugin
d30b5415fd
Reorder headers.
2021-01-05 16:46:24 +03:00
Egor Pugin
4ed601956e
More std::vector.
2021-01-05 14:46:11 +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
Stefan Weil
64e902ddf7
Remove genericvector.h from public API
...
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
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
9a4bd041c8
Fix build for unittests
...
Commit 29f2cff203
was the wrong fix
for the compiler warnings because it broke the unittest build.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-26 21:36:34 +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
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
Shree Devi Kumar
57f74d2b73
Fix file location for unicharset for mastertrainer_test
2019-01-21 17:36:08 +01:00
Stefan Weil
2916dc86dd
unittest: Add mastertrainer_test (only works partially)
...
The test currently has subtests which fail because of missing files.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-12 16:23:13 +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