Skip to content

Commit

Permalink
unittest: Fix and enable tablefind_test
Browse files Browse the repository at this point in the history
This requires a local definition for macro ABSL_ARRAYSIZE
(normally defined as part of the Abseil API).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Aug 26, 2018
1 parent f95725a commit 7aef7a3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
4 changes: 4 additions & 0 deletions unittest/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ check_PROGRAMS = \
progress_test \
rect_test \
stats_test \
tablefind_test \
tesseracttests

TESTS = $(check_PROGRAMS)
Expand Down Expand Up @@ -127,6 +128,9 @@ rect_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS)
stats_test_SOURCES = stats_test.cc
stats_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS)

tablefind_test_SOURCES = tablefind_test.cc
tablefind_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS)

tesseracttests_SOURCES = ../tests/tesseracttests.cpp
tesseracttests_LDADD = $(GTEST_LIBS) $(TESS_LIBS) $(LEPTONICA_LIBS)

Expand Down
18 changes: 15 additions & 3 deletions unittest/tablefind_test.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
// (C) Copyright 2017, Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <memory>

#include "tesseract/textord/colpartition.h"
#include "tesseract/textord/colpartitiongrid.h"
#include "tesseract/textord/tablefind.h"
#include "colpartition.h"
#include "colpartitiongrid.h"
#include "tablefind.h"

#include "include_gunit.h"

using tesseract::ColPartition;
using tesseract::ColPartition_LIST;
Expand Down

0 comments on commit 7aef7a3

Please sign in to comment.