Skip to content

Commit

Permalink
unittest: Fix compiler warnings (signed/unsigned)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Jun 28, 2019
1 parent 40c1cf6 commit 655ba7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions unittest/baseapi_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ TEST_F(TesseractTest, InitConfigOnlyTest) {
const char* langs[] = {"eng", "chi_tra", "jpn", "vie"};
std::unique_ptr<tesseract::TessBaseAPI> api;
CycleTimer timer;
for (int i = 0; i < ARRAYSIZE(langs); ++i) {
for (size_t i = 0; i < ARRAYSIZE(langs); ++i) {
api.reset(new tesseract::TessBaseAPI);
timer.Restart();
EXPECT_EQ(0, api->Init(TessdataPath().c_str(), langs[i],
Expand All @@ -333,7 +333,7 @@ TEST_F(TesseractTest, InitConfigOnlyTest) {
vars_vec.push_back(STRING("tessedit_init_config_only"));
vars_values.push_back(STRING("1"));
LOG(INFO) << "Switching to config only initialization:";
for (int i = 0; i < ARRAYSIZE(langs); ++i) {
for (size_t i = 0; i < ARRAYSIZE(langs); ++i) {
api.reset(new tesseract::TessBaseAPI);
timer.Restart();
EXPECT_EQ(0, api->Init(TessdataPath().c_str(), langs[i],
Expand Down
4 changes: 2 additions & 2 deletions unittest/heap_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class HeapTest : public testing::Test {
virtual ~HeapTest();
// Pushes the test data onto both the heap and the KDVector.
void PushTestData(GenericHeap<IntKDPair>* heap, KDVector* v) {
for (int i = 0; i < ARRAYSIZE(test_data); ++i) {
for (size_t i = 0; i < ARRAYSIZE(test_data); ++i) {
IntKDPair pair(test_data[i], i);
heap->Push(&pair);
v->push_back(pair);
Expand Down Expand Up @@ -137,7 +137,7 @@ TEST_F(HeapTest, RevalueTest) {
GenericHeap<PtrPair> heap;
GenericVector<PtrPair> v;
// Push the test data onto both the heap and the vector.
for (int i = 0; i < ARRAYSIZE(test_data); ++i) {
for (size_t i = 0; i < ARRAYSIZE(test_data); ++i) {
PtrPair h_pair;
h_pair.key = test_data[i];
PtrPair v_pair;
Expand Down

0 comments on commit 655ba7a

Please sign in to comment.