tesseract/unittest
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
..
fuzzers [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
syntaxnet [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
third_party/utf [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
util/utf8 [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
apiexample_test.cc [unittest] Use more smart ptrs, more std::make_unique instead of .reset(new T()). 2021-03-14 23:06:19 +03:00
applybox_test.cc Replace remaining STRING by std::string in src/classify 2021-03-15 09:11:41 +01:00
baseapi_test.cc [unittest] Use more smart ptrs, more std::make_unique instead of .reset(new T()). 2021-03-14 23:06:19 +03:00
baseapi_thread_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
bitvector_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
capiexample_c_test.c [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
capiexample_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
cleanapi_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
colpartition_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
commandlineflags_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
cycletimer.h [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
dawg_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
denorm_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
doubleptr.h [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
equationdetect_test.cc Replace remaining GenericVector by std::vector for src/ccmain 2021-03-16 16:55:38 +01:00
fileio_test.cc [unittest] Use more smart ptrs, more std::make_unique instead of .reset(new T()). 2021-03-14 23:06:19 +03:00
heap_test.cc Replace more GenericVector by std::vector and remove GenericVector::choose_nth_item 2021-03-17 20:28:04 +01:00
imagedata_test.cc Replace more STRING by std::string 2021-03-13 21:15:52 +01:00
include_gunit.h [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
indexmapbidi_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
intfeaturemap_test.cc Replace more GenericVector by std::vector for src/ccstruct 2021-03-17 13:45:54 +01:00
intsimdmatrix_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
lang_model_test.cc Replace remaining STRING by std::string in unittest 2021-03-15 09:11:41 +01:00
layout_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
ligature_table_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
linlsq_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
list_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
loadlang_test.cc [unittest] Use more smart ptrs, more std::make_unique instead of .reset(new T()). 2021-03-14 23:06:19 +03:00
log.h [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
lstm_recode_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
lstm_squashed_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
lstm_test.cc [training] Modernize. 2021-03-14 23:47:42 +03:00
lstm_test.h Replace remaining STRING by std::string in unittest 2021-03-15 09:11:41 +01:00
lstmtrainer_test.cc Replace remaining STRING by std::string in unittest 2021-03-15 09:11:41 +01:00
mastertrainer_test.cc Replace remaining STRING by std::string in unittest 2021-03-15 09:11:41 +01:00
matrix_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
networkio_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
normstrngs_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
normstrngs_test.h [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
nthitem_test.cc Replace more GenericVector by std::vector and remove GenericVector::choose_nth_item 2021-03-17 20:28:04 +01:00
osd_test.cc [unittest] Use more smart ptrs, more std::make_unique instead of .reset(new T()). 2021-03-14 23:06:19 +03:00
pagesegmode_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
pango_font_info_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
paragraphs_test.cc Replace remaining GenericVector by std::vector for src/ccmain 2021-03-16 16:55:38 +01:00
params_model_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
progress_test.cc [unittest] Use more smart ptrs, more std::make_unique instead of .reset(new T()). 2021-03-14 23:06:19 +03:00
qrsequence_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
README.md Provide more details for sucessfull running of unittests. 2019-10-20 22:15:21 +02:00
recodebeam_test.cc Replace remaining STRING by std::string in unittest 2021-03-15 09:11:41 +01:00
rect_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
resultiterator_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
scanutils_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
shapetable_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
stats_test.cc Replace remaining GenericVector by std::vector for src/textord 2021-03-16 16:59:12 +01:00
stridemap_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
stringrenderer_test.cc Replace remaining STRING by std::string in unittest 2021-03-15 09:11:41 +01:00
tablefind_test.cc [unittest] Use more smart ptrs, more std::make_unique instead of .reset(new T()). 2021-03-14 23:06:19 +03:00
tablerecog_test.cc Replace remaining GenericVector by std::vector for src/textord 2021-03-16 16:59:12 +01:00
tabvector_test.cc [unittest] Use more smart ptrs, more std::make_unique instead of .reset(new T()). 2021-03-14 23:06:19 +03:00
tatweel_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
tesseract_leaksanitizer.supp Fix Memory leak in ligature_table_test 2021-01-24 18:17:06 +01:00
textlineprojection_test.cc [unittest] Use more smart ptrs, more std::make_unique instead of .reset(new T()). 2021-03-14 23:06:19 +03:00
tfile_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
unichar_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
unicharcompress_test.cc Replace remaining GenericVector by std::vector in src/lstm 2021-03-16 12:25:11 +01:00
unicharset_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
validate_grapheme_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
validate_indic_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
validate_khmer_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
validate_myanmar_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00
validator_test.cc [clang-format] Format unit tests. 2021-03-13 00:06:34 +03:00

Unit Testing for Tesseract

Requirements

Files and structure


├── langdata_lstm
│   ├── common.punc
│   ├── common.unicharambigs
│   ├── desired_bigrams.txt
│   ├── eng
│   │   ├── desired_characters
│   │   ├── eng.config
│   │   ├── eng.numbers
│   │   ├── eng.punc
│   │   ├── eng.singles_text
│   │   ├── eng.training_text
│   │   ├── eng.unicharambigs
│   │   ├── eng.wordlist
│   │   └── okfonts.txt
│   ├── extended
│   │   └── extended.config
│   ├── extendedhin
│   │   └── extendedhin.config
│   ├── font_properties
│   ├── forbidden_characters_default
│   ├── hin
│   │   ├── hin.config
│   │   ├── hin.numbers
│   │   ├── hin.punc
│   │   └── hin.wordlist
│   ├── kan
│   │   └── kan.config
│   ├── kor
│   │   └── kor.config
│   ├── osd
│   │   └── osd.unicharset
│   └── radical-stroke.txt
├── tessdata
│   ├── ara.traineddata
│   ├── chi_tra.traineddata
│   ├── eng.traineddata
│   ├── heb.traineddata
│   ├── hin.traineddata
│   ├── jpn.traineddata
│   ├── kmr.traineddata
│   ├── osd.traineddata
│   └── vie.traineddata
├── tessdata_best
│   ├── eng.traineddata
│   ├── fra.traineddata
│   ├── kmr.traineddata
│   └── osd.traineddata
├── tessdata_fast
│   ├── eng.traineddata
│   ├── kmr.traineddata
│   ├── osd.traineddata
│   └── script
│       └── Latin.traineddata
└── tesseract
    ├── abseil
    ...
    ├── test
    ├── unittest
    └── VERSION

Fonts

Run tests

To run the tests, do the following in tesseract folder

autoreconf -fiv
git submodule update --init
export TESSDATA_PREFIX=/prefix/to/path/to/tessdata
make check