Skip to content

Commit

Permalink
fix resultiterator_test for extra \n
Browse files Browse the repository at this point in the history
resultiterator_test.cc
  • Loading branch information
Shreeshrii committed Feb 10, 2019
1 parent ec8f02c commit 8612170
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions unittest/resultiterator_test.cc
Expand Up @@ -122,7 +122,7 @@ class ResultIteratorTest : public testing::Test {
// EXPECTs that the rebuild string exactly matches the truth string.
void VerifyIteratorText(const std::string& truth, PageIteratorLevel level,
ResultIterator* it) {
LOG(INFO) << "Text Test Level " << level;
LOG(INFO) << "Text Test Level " << level << "\n";
it->Begin();
std::string result;
do {
Expand All @@ -136,7 +136,9 @@ class ResultIteratorTest : public testing::Test {
} else {
result += ' ';
}
if (it->IsAtFinalElement(tesseract::RIL_PARA, level)) result += '\n';
if (it->IsAtFinalElement(tesseract::RIL_PARA, level) &&
!(it->IsAtFinalElement(tesseract::RIL_BLOCK, level)))
result += '\n';
}
} while (it->Next(level));
EXPECT_STREQ(truth.c_str(), result.c_str())
Expand Down

0 comments on commit 8612170

Please sign in to comment.