Stefan Weil
77ed2886a7
Modernize code (clang-tidy -checks='-*,modernize-loop-convert')
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-22 09:02:51 +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
48fe1e0232
Replace more GenericVector by std::vector for src/unittest
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-18 15:32:18 +01:00
Stefan Weil
edd599fa7b
Replace more GenericVector by std::vector and remove GenericVector::choose_nth_item
...
KDVector is now derived from std::vector.
This requires an update for unittest nthitem_test because
std::nth_element does not handle all corner cases of choose_nth_item.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-17 20:28:04 +01:00
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
64e902ddf7
Remove genericvector.h from public API
...
Signed-off-by: Stefan Weil <sw@weil.de>
2020-12-28 21:03:29 +01:00
Egor Pugin
3187f2ef08
Move doubleptr.h to unittests as it is used only there.
2020-12-28 02:32:27 +03:00
Stefan Weil
2fe1532926
Fix some compiler errors for heap_test (more remaining)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2020-12-27 18:30:56 +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
655ba7af10
unittest: Fix compiler warnings (signed/unsigned)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-28 08:11:42 +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
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
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
Stefan Weil
de7676c88e
unittest: Fix and enable heap_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:39:40 +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