mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-06-11 20:53:24 +08:00
unittest: Fix and enable tablerecog_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
7aef7a304f
commit
aac00836d5
@ -69,6 +69,7 @@ check_PROGRAMS = \
|
||||
rect_test \
|
||||
stats_test \
|
||||
tablefind_test \
|
||||
tablerecog_test \
|
||||
tesseracttests
|
||||
|
||||
TESTS = $(check_PROGRAMS)
|
||||
@ -131,6 +132,9 @@ stats_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS)
|
||||
tablefind_test_SOURCES = tablefind_test.cc
|
||||
tablefind_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS)
|
||||
|
||||
tablerecog_test_SOURCES = tablerecog_test.cc
|
||||
tablerecog_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS)
|
||||
|
||||
tesseracttests_SOURCES = ../tests/tesseracttests.cpp
|
||||
tesseracttests_LDADD = $(GTEST_LIBS) $(TESS_LIBS) $(LEPTONICA_LIBS)
|
||||
|
||||
|
@ -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/tablerecog.h"
|
||||
#include "colpartition.h"
|
||||
#include "colpartitiongrid.h"
|
||||
#include "tablerecog.h"
|
||||
|
||||
#include "include_gunit.h"
|
||||
|
||||
using tesseract::ColPartition;
|
||||
using tesseract::ColPartition_LIST;
|
||||
@ -83,7 +95,7 @@ class SharedTest : public testing::Test {
|
||||
ColPartition* part = ColPartition::FakePartition(box, PT_FLOWING_TEXT,
|
||||
BRT_TEXT, BTFT_NONE);
|
||||
part->set_median_width(3);
|
||||
part->set_median_size(3);
|
||||
part->set_median_height(3);
|
||||
text_grid_->InsertBBox(true, true, part);
|
||||
|
||||
tesseract::ColPartition_IT add_it(&allocated_parts_);
|
||||
|
Loading…
Reference in New Issue
Block a user