unittest/layout_test.cc
TEST_F(LayoutTest, HebrewOrderingAndSkew) {
  SetImage("hebrew.png", "eng");
  // Just run recognition.
  EXPECT_EQ(api_.Recognize(nullptr), 0);
  tesseract::MutableIterator *it = api_.GetMutableIterator();
  // In eng mode, block order should not be RTL.
  VerifyRoughBlockOrder(false, it);
  VerifyTotalContainment(1, it);
  delete it;
  // Now try again using Hebrew.
  SetImage("hebrew.png", "heb");
  // Just run recognition.
  EXPECT_EQ(api_.Recognize(nullptr), 0);
  it = api_.GetMutableIterator();
  // In heb mode, block order should be RTL.
  VerifyRoughBlockOrder(true, it);
  // And blobs should still be fully contained.
  VerifyTotalContainment(-1, it);
  delete it;
}
// Tests that Tesseract gets the important blocks and in the right order
// on GOOGLE:13510798882202548:74:84.sj-79.tif (Hebrew image)
// TODO: replace hebrew.png by Google image referred above
Tests that Tesseract gets the important blocks and in the right order
on GOOGLE:13510798882202548:74:84.sj-79.tif (Hebrew image)
TODO: replace hebrew.png by Google image referred above
Tests that Tesseract gets the important blocks and in the right order on GOOGLE : 13510798882202548 : 74 : 84 . sj - 79 . tif ( Hebrew image ) TODO : replace hebrew . png by Google image referred above
TEST_F(LayoutTest, HebrewOrderingAndSkew) {
  SetImage("hebrew.png", "eng");
  EXPECT_EQ(api_.Recognize(nullptr), 0);
  tesseract::MutableIterator *it = api_.GetMutableIterator();
  VerifyRoughBlockOrder(false, it);
  VerifyTotalContainment(1, it);
  delete it;
  SetImage("hebrew.png", "heb");
  EXPECT_EQ(api_.Recognize(nullptr), 0);
  it = api_.GetMutableIterator();
  VerifyRoughBlockOrder(true, it);
  VerifyTotalContainment(-1, it);
  delete it;
}
TEST_F ( LayoutTest , HebrewOrderingAndSkew ) { SetImage ( " " , " " ) ; EXPECT_EQ ( api_ . Recognize ( nullptr ) , 0 ) ; tesseract :: MutableIterator * it = api_ . GetMutableIterator ( ) ; VerifyRoughBlockOrder ( false , it ) ; VerifyTotalContainment ( 1 , it ) ; delete it ; SetImage ( " " , " " ) ; EXPECT_EQ ( api_ . Recognize ( nullptr ) , 0 ) ; it = api_ . GetMutableIterator ( ) ; VerifyRoughBlockOrder ( true , it ) ; VerifyTotalContainment ( -1 , it ) ; delete it ; }
Tests that Tesseract gets the important blocks and in the right order
on GOOGLE:13510798882202548:74:84.sj-79.tif (Hebrew image)
TODO: replace hebrew.png by Google image referred above
Tests that Tesseract gets the important blocks and in the right order on GOOGLE : 13510798882202548 : 74 : 84 . sj - 79 . tif ( Hebrew image ) TODO : replace hebrew . png by Google image referred above
// Just run recognition. // In eng mode, block order should not be RTL. // Now try again using Hebrew. // Just run recognition. // In heb mode, block order should be RTL. // And blobs should still be fully contained.