Shree Devi Kumar
e67ad46fca
fix typo
2019-01-19 05:24:17 +00:00
Shree Devi Kumar
9e599e1e54
Partial fix for unicharcompress_test
2019-01-19 05:13:03 +00:00
Stefan Weil
9b2bf10391
Fix build for unichar_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-18 21:15:33 +01:00
Shree Devi Kumar
20ed60b31f
Fix unicharset_test
2019-01-18 16:41:29 +00:00
Stefan Weil
502bb624c2
More optimisations for IntSimdMatrix
...
* Move IntDotProductSSE. That allows inlining of the code.
* Improve IntDotProductSSE by moving some instructions.
* Remove unused num_input_groups_ from IntSimdMatrix.
* Re-order elements in IntSimdMatrix to avoid padding.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-14 21:34:37 +01:00
Stefan Weil
95606398f5
Clean code for IntSimdMatrix
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-14 21:34:37 +01:00
Stefan Weil
7fc7d28dd0
Compile files for AVX, AVX2 or SSE only when needed
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-14 21:34:37 +01:00
Stefan Weil
a9a1035e55
Move IntSimdMatrixNative from IntSimdMatrix to unittest
...
It is only used for the unit test.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-14 21:34:37 +01:00
Stefan Weil
605b4d66c7
Replace dynamically allocated IntSimdMatrix instances by constants
...
Two header files are no longer needed and could be removed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-14 21:34:37 +01:00
Stefan Weil
26be7c5d2e
Use constructor with parameters for IntSimdMatrix
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-14 21:34:37 +01:00
Stefan Weil
7c70147701
Move shaped weights from IntSimMatrix to WeightMatrix
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-14 21:34:37 +01:00
Stefan Weil
c4de29d16f
unittest: Allow more time for apiexample_test when using a debug build
...
OCR of an image needs much more time than 55 s when running with
a debug build without optimisations on a slow host.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-14 17:56:35 +01:00
Stefan Weil
e67751633a
unittest: Fix comment
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-14 17:56:35 +01:00
Stefan Weil
a5283f293d
Add test for the C++ implementation of MatrixDotVector
...
Check also whether the sum of all results matches the expected value.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-14 17:56:35 +01:00
Stefan Weil
5d3d251267
Fix build for unittest
...
Debug builds failed because libpthread (needed for googletest) was missing.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-14 17:56:35 +01:00
Stefan Weil
5dd606c631
Replace NULL by nullptr
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-01-01 22:45:49 +01: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
9b783822a0
Remove unused include statements for tprintf.h
...
Format also a call of tprintf and add a missing explicit include statement.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-11-18 17:25:01 +01:00
Stefan Weil
ff5347c4ad
Fix memory leak in osd_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-11-13 09:09:23 +01:00
Stefan Weil
5209aa6c95
Fix memory leak in loadlang_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-11-13 09:09:10 +01:00
Stefan Weil
74f6d0e7ff
Fix memory leak in apiexample_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-11-13 09:08:42 +01:00
Stefan Weil
303ac97102
Fix memory leaks and typos in progress_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-11-13 08:24:50 +01:00
Stefan Weil
f4ec5beedc
Remove dummy test
...
This reverts commit 99755b0732
.
The dummy test is no longer needed as there exist a lot of real tests now.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-11-08 18:53:15 +01:00
Stefan Weil
d04133f07e
unittest: Add more files from Google
...
They were provided by Jeff Breidenbach <jbreiden@google.com>.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-18 16:39:35 +02: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
d8fdbdb9fd
CycleTimer: Add missing initialization (CID 1396168)
...
This fixes a warning from Coverity Scan.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-16 16:53:23 +02:00
Shree Devi Kumar
f5dfab1559
Add Leptonica lib for baseapi_test
2018-10-13 17:22:49 +00:00
Stefan Weil
3f5c36191f
unittest: Disable build rules for tests which still fail to build
...
This fixes warnings from autogen.sh.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-12 17:48:57 +02: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
f93fb9de74
unittest: Add lang_model_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
de6a759744
unittest: Add paragraphs_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-12 16:23:10 +02:00
Stefan Weil
53f0e7658f
unittest: Add imagedata_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-12 15:15:02 +02:00
Stefan Weil
420a0286fd
unittest: Add fileio_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-12 08:13:39 +02:00
Stefan Weil
d3cf423748
unittest: Add qrsequence_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-12 08:01:58 +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
db16fea6b1
Add a basic implementation of class CycleTimer
...
It is used by baseapi_test.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-11 22:18:58 +02:00
Stefan Weil
27bfaccf73
Enhance LOG emulation
...
It is needed for baseapi_test and other unit tests.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-11 22:18:58 +02:00
Stefan Weil
db07a69b56
Add more hacks for use with Google unittests
...
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
5178142ab1
NthItemTest: Add definition for virtual destructor
...
This fixes a compiler warning from clang:
unittest/nthitem_test.cc:22:7: warning:
'NthItemTest' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit [-Wweak-vtables]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-09-04 12:11:23 +02:00
Stefan Weil
80c1235c12
HeapTest: Add definition for virtual destructor
...
This fixes a compiler warning from clang:
unittest/heap_test.cc:27:7: warning:
'HeapTest' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit [-Wweak-vtables]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-09-04 12:11:23 +02:00
Shree Devi Kumar
b5d41b77eb
Add leptonica-libs for apply-boxes test
2018-08-30 04:25:28 +00:00
Shree Devi Kumar
85b03723ea
DISABLE some tests by default since they take long to run. They can be forced to run by --gtest_also_run_disabled_tests argument
2018-08-29 20:28:20 +00: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
c1af1f6694
unittest: Fix and enable commandlineflags_test
...
It only works if training is enabled and built.
The test "PrintUsageAndExit" had to be disabled because it
currently fails.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-27 11:55:23 +02:00
Stefan Weil
ca7ae1c3a6
unittest: Fix and enable validator_test
...
It requires additional training libraries, so this test only works
if training is enabled and build.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-27 11:45:35 +02:00
Stefan Weil
70665721f4
unittest: Fix and enable tfile_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-26 19:15:06 +02:00
Stefan Weil
8e404679c1
unittest: Fix and enable tabvector_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-26 19:15:06 +02:00
Stefan Weil
aac00836d5
unittest: Fix and enable tablerecog_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-26 19:15:06 +02:00