Skip to content

Commit

Permalink
unittest: Fix and enable heap_test
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Aug 25, 2018
1 parent 7780928 commit de7676c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
4 changes: 4 additions & 0 deletions unittest/Makefile.am
Expand Up @@ -56,6 +56,7 @@ check_PROGRAMS = \
cleanapi_test \
colpartition_test \
denorm_test \
heap_test \
progress_test \
intsimdmatrix_test \
matrix_test \
Expand Down Expand Up @@ -83,6 +84,9 @@ colpartition_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS)
denorm_test_SOURCES = denorm_test.cc
denorm_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS)

heap_test_SOURCES = heap_test.cc
heap_test_LDADD = $(GTEST_LIBS) $(TESS_LIBS)

progress_test_SOURCES = progress_test.cc
progress_test_LDFLAGS = $(OPENCL_LDFLAGS) $(LEPTONICA_LIBS)
progress_test_LDADD = $(GTEST_LIBS) $(GMOCK_LIBS) $(TESS_LIBS) $(LEPTONICA_LIBS)
Expand Down
25 changes: 16 additions & 9 deletions unittest/heap_test.cc
@@ -1,11 +1,23 @@
// (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 <string>
#include <utility>

#include "tesseract/ccutil/doubleptr.h"
#include "tesseract/ccutil/genericheap.h"
#include "tesseract/ccutil/genericvector.h"
#include "tesseract/ccutil/kdpair.h"
#include "doubleptr.h"
#include "genericheap.h"
#include "genericvector.h"
#include "kdpair.h"

#include "include_gunit.h"

namespace tesseract {

Expand Down Expand Up @@ -176,8 +188,3 @@ TEST_F(HeapTest, DoublePtrTest) {
}

} // namespace tesseract





0 comments on commit de7676c

Please sign in to comment.