unittest/resultiterator_test.cc
TEST_F(ResultIteratorTest, DualStartTextlineOrderTest) {
  const StrongScriptDirection word_dirs[] = {dL, dL, dN, dL, dN, dR, dR, dR};
  int reading_order_rtl_context[] = {7, 6, 5, 4, ResultIterator::kMinorRunStart,
                                     0, 1, 2, 3, ResultIterator::kMinorRunEnd};
  int reading_order_ltr_context[] = {
      0, 1, 2, 3, 4, ResultIterator::kMinorRunStart, 7, 6, 5, ResultIterator::kMinorRunEnd};

  ExpectTextlineReadingOrder(true, word_dirs, countof(word_dirs), reading_order_ltr_context,
                             countof(reading_order_ltr_context));
  ExpectTextlineReadingOrder(false, word_dirs, countof(word_dirs), reading_order_rtl_context,
                             countof(reading_order_rtl_context));
}
// Test that a sequence of words that could be interpreted to start from
// the left side left-to-right or from the right side right-to-left is
// interpreted appropriately in different contexts.
Test that a sequence of words that could be interpreted to start from
the left side left-to-right or from the right side right-to-left is
interpreted appropriately in different contexts.
Test that a sequence of words that could be interpreted to start from the left side left - to - right or from the right side right - to - left is interpreted appropriately in different contexts .
TEST_F(ResultIteratorTest, DualStartTextlineOrderTest) {
  const StrongScriptDirection word_dirs[] = {dL, dL, dN, dL, dN, dR, dR, dR};
  int reading_order_rtl_context[] = {7, 6, 5, 4, ResultIterator::kMinorRunStart,
                                     0, 1, 2, 3, ResultIterator::kMinorRunEnd};
  int reading_order_ltr_context[] = {
      0, 1, 2, 3, 4, ResultIterator::kMinorRunStart, 7, 6, 5, ResultIterator::kMinorRunEnd};
  ExpectTextlineReadingOrder(true, word_dirs, countof(word_dirs), reading_order_ltr_context,
                             countof(reading_order_ltr_context));
  ExpectTextlineReadingOrder(false, word_dirs, countof(word_dirs), reading_order_rtl_context,
                             countof(reading_order_rtl_context));
}
TEST_F ( ResultIteratorTest , DualStartTextlineOrderTest ) { const StrongScriptDirection word_dirs [ ] = { dL , dL , dN , dL , dN , dR , dR , dR } ; int reading_order_rtl_context [ ] = { 7 , 6 , 5 , 4 , ResultIterator :: kMinorRunStart , 0 , 1 , 2 , 3 , ResultIterator :: kMinorRunEnd } ; int reading_order_ltr_context [ ] = { 0 , 1 , 2 , 3 , 4 , ResultIterator :: kMinorRunStart , 7 , 6 , 5 , ResultIterator :: kMinorRunEnd } ; ExpectTextlineReadingOrder ( true , word_dirs , countof ( word_dirs ) , reading_order_ltr_context , countof ( reading_order_ltr_context ) ) ; ExpectTextlineReadingOrder ( false , word_dirs , countof ( word_dirs ) , reading_order_rtl_context , countof ( reading_order_rtl_context ) ) ; }
Test that a sequence of words that could be interpreted to start from
the left side left-to-right or from the right side right-to-left is
interpreted appropriately in different contexts.
Test that a sequence of words that could be interpreted to start from the left side left - to - right or from the right side right - to - left is interpreted appropriately in different contexts .