Skip to content

Commit

Permalink
unittest: Add paragraphs_test
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Oct 12, 2018
1 parent 53f0e76 commit de6a759
Show file tree
Hide file tree
Showing 3 changed files with 382 additions and 351 deletions.
4 changes: 3 additions & 1 deletion src/ccmain/paragraphs_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* File: paragraphs_internal.h
* Description: Paragraph Detection internal data structures.
* Author: David Eger
* Created: 11 March 2011
*
* (C) Copyright 2011, Google Inc.
** Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -21,10 +20,12 @@
#define TESSERACT_CCMAIN_PARAGRAPHS_INTERNAL_H_

#include "paragraphs.h"
#include "publictypes.h" // for ParagraphJustification

// NO CODE OUTSIDE OF paragraphs.cpp AND TESTS SHOULD NEED TO ACCESS
// DATA STRUCTURES OR FUNCTIONS IN THIS FILE.

class UNICHARSET;
class WERD_CHOICE;

namespace tesseract {
Expand Down Expand Up @@ -299,4 +300,5 @@ void CanonicalizeDetectionResults(
PARA_LIST *paragraphs);

} // namespace

#endif // TESSERACT_CCMAIN_PARAGRAPHS_INTERNAL_H_
7 changes: 7 additions & 0 deletions unittest/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ check_PROGRAMS = \
matrix_test \
nthitem_test \
osd_test \
paragraphs_test \
progress_test \
qrsequence_test \
rect_test \
Expand Down Expand Up @@ -183,6 +184,12 @@ matrix_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS)
nthitem_test_SOURCES = nthitem_test.cc
nthitem_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS)

pango_font_info_test_SOURCES = pango_font_info_test.cc
pango_font_info_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS)

paragraphs_test_SOURCES = paragraphs_test.cc
paragraphs_test_LDADD = $(ABSEIL_LIBS) $(GTEST_LIBS) $(TESS_LIBS)

osd_test_SOURCES = osd_test.cc
osd_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS) $(LEPTONICA_LIBS)

Expand Down
Loading

0 comments on commit de6a759

Please sign in to comment.