Commit Graph

13 Commits

Author SHA1 Message Date
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
e07c99d874 Replace deprecated INSTANTIATE_TEST_CASE_P 2021-01-20 18:03:05 +00: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
0b97bc5c16 Fix include statements for Leptonica header
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-12-13 13:26:36 +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
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
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
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
6a28cce96b Fix whitespace issues
* Remove whitespace (blanks, tabs, cr) at line endings

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-01 13:19:52 +02:00
Shreeshrii
07a6e64174
remove non-essential logging function
Also got error while building on  
Linux tesseract-ocr 4.4.0-122-generic #146-Ubuntu SMP Mon Apr 23 15:33:25 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux
with 
g++ (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

```
g++ -DHAVE_CONFIG_H -I. -I..  -DNDEBUG -DTESSDATA_DIR="\"/home/ubuntu/tessdata\"" -DTESTING_DIR="\"/home/ubuntu/tesseract/testing\"" -DPANGO_ENABLE_ENGINE -I../src/api -I../src/api -I../src/arch -I../src/ccmain -I../src/ccstruct -I../src/ccutil -I../src/classify -I../src/cutil -I../src/dict -I../src/display -I../src/lstm -I../src/textord -I../src/viewer -I../src/wordrec -isystem ../googletest/googletest/include -I/usr/local/include/leptonica -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/powerpc64le-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12  -g -O2 -std=c++11 -MT osd_test.o -MD -MP -MF $depbase.Tpo -c -o osd_test.o osd_test.cc &&\
mv -f $depbase.Tpo $depbase.Po
In file included from /usr/include/features.h:367:0,
                 from /usr/include/powerpc64le-linux-gnu/c++/5/bits/os_defines.h:39,
                 from /usr/include/powerpc64le-linux-gnu/c++/5/bits/c++config.h:482,
                 from /usr/include/c++/5/iostream:38,
                 from log.h:19,
                 from osd_test.cc:20:
/usr/include/powerpc64le-linux-gnu/bits/mathcalls.h:109:1: error: ‘double log(double)’ redeclared as different kind of symbol
 __MATHCALL_VEC (log,, (_Mdouble_ __x));
 ^
In file included from osd_test.cc:20:0:
log.h:26:3: note: previous declaration ‘LOG log’
 } log;
   ^
```
2018-05-05 16:34:26 +05:30
Stefan Weil
40c71bfcb8 Update unittest for new script data location and fix out-of-tree build (#1386)
tessdata_best and tessdata_fast recently changed the path for script data,
so the tests have to be updated, too.

In addition, the relative paths did not work with out-of-tree builds.
Use absolute paths and add them as C macros to the compiler flags.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-13 21:15:44 +01:00
Shreeshrii
5845e1a27d Add unit test for OSD, update apiexample test (#1359)
* Update apiexample_test.cc

* Add OSD test and logging function

* Add images for OSD unittest
2018-03-04 14:52:27 +01:00