- for( unsigned int index = 0u; index < numberOfTests; ++index )
- {
- if( !SetBidirectionalInfoTest( data[index] ) )
- {
- tet_result(TET_FAIL);
- }
- }
-
- tet_result(TET_PASS);
- END_TEST;
-}
-
-int UtcDaliReorderLines(void)
-{
- ToolkitTestApplication application;
- tet_infoline(" UtcDaliSetBidirectionalInfo");
-
- unsigned int visualToLogical0301[] = { 0u, 1u, 2u, 3u, 4u, 5u, 9u, 8u, 7u, 6u, 10u };
- unsigned int visualToLogical0302[] = { 3u, 2u, 1u, 0u, 4u, 5u, 6u, 7u, 8u, 9u, 10u };
- unsigned int visualToLogical0303[] = { 0u, 1u, 2u, 3u, 4u };
- unsigned int visualToLogical0304[] = { 12u, 11u, 10u, 9u, 8u, 7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u };
- unsigned int visualToLogical0305[] = { 10u, 9u, 8u, 7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u };
- unsigned int visualToLogical0306[] = { 9u, 8u, 7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u };
- unsigned int visualToLogical0307[] = { 13u, 8u, 9u, 10u, 11u, 12u, 7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u };
- unsigned int visualToLogical0308[] = { 5u, 0u, 1u, 2u, 3u, 4u };
- unsigned int visualToLogical0309[] = { 0u, 1u, 2u, 3u, 4u, 5u, 9u, 8u, 7u, 6u, 10u };
- unsigned int visualToLogical0310[] = { 3u, 2u, 1u, 0u, 4u, 5u, 6u, 7u, 8u, 9u, 10u };
- unsigned int visualToLogical0311[] = { 0u, 1u, 2u, 3u, 4u };
- unsigned int visualToLogical0312[] = { 12u, 11u, 10u, 9u, 8u, 7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u };
- unsigned int visualToLogical0313[] = { 10u, 9u, 8u, 7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u };
- unsigned int visualToLogical0314[] = { 9u, 8u, 7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u };
- unsigned int visualToLogical0315[] = { 13u, 8u, 9u, 10u, 11u, 12u, 7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u };
- unsigned int visualToLogical0316[] = { 0u, 1u, 2u, 3u, 4u };
-
- BidiLineData bidiLine01[] = {};
- BidiLineData bidiLine02[] = {};
- BidiLineData bidiLine03[] = {
- {
- 17u,
- 11u,
- visualToLogical0301
- },
- {
- 28u,
- 11u,
- visualToLogical0302
- },
- {
- 39u,
- 5u,
- visualToLogical0303
- },
- {
- 44u,
- 13u,
- visualToLogical0304
- },
- {
- 57u,
- 11u,
- visualToLogical0305
- },
- {
- 68u,
- 10u,
- visualToLogical0306
- },
- {
- 78u,
- 14u,
- visualToLogical0307
- },
- {
- 92u,
- 6u,
- visualToLogical0308
- },
- {
- 115u,
- 11u,
- visualToLogical0309
- },
- {
- 126u,
- 11u,
- visualToLogical0310
- },
- {
- 137u,
- 5u,
- visualToLogical0311
- },
- {
- 142u,
- 13u,
- visualToLogical0312
- },
- {
- 155u,
- 11u,
- visualToLogical0313
- },
- {
- 166u,
- 10u,
- visualToLogical0314
- },
- {
- 176u,
- 14u,
- visualToLogical0315
- },
- {
- 190u,
- 5u,
- visualToLogical0316
- },
- };
-
- bool directions02[] = { false, false, false, false, false, false };
- bool directions03[] = { false, false, false, false, false, true, true, true, true, true, false, false, false, false, false, true, true, true, true, true };
-
- struct ReorderLinesData data[] =
- {
- {
- "Zero characters.",
- "",
- 0u,
- 0u,
- 0u,
- bidiLine01,
- 0u,
- NULL
- },
- {
- "Left to right text only.",
- "Hello world demo\nhello world demo\nhello world demo.",
- 0u,
- 51u,
- 0u,
- bidiLine02,
- 6u,
- directions02
- },
- {
- "Bidirectional paragraphs.",
- "Hello world demo\nhello שלום עולם world demo\nשלום بالعالم עולם مرحبا שלום עולם بالعالم hello world\nHello world demo\nhello שלום עולם world demo\nשלום بالعالم עולם مرحبا שלום עולם بالعالم hello world",
- 0u,
- 195u,
- 16u,
- bidiLine03,
- 20u,
- directions03
- },
- {
- "Bidirectional paragraphs. Update initial paragraphs.",
- "Hello world demo\nhello שלום עולם world demo\nשלום بالعالم עולם مرحبا שלום עולם بالعالم hello world\nHello world demo\nhello שלום עולם world demo\nשלום بالعالم עולם مرحبا שלום עולם بالعالم hello world",
- 0u,
- 44u,
- 16u,
- bidiLine03,
- 20u,
- directions03
- },
- {
- "Bidirectional paragraphs. Update middle paragraphs.",
- "Hello world demo\nhello שלום עולם world demo\nשלום بالعالم עולם مرحبا שלום עולם بالعالم hello world\nHello world demo\nhello שלום עולם world demo\nשלום بالعالم עולם مرحبا שלום עולם بالعالم hello world",
- 44u,
- 54u,
- 16u,
- bidiLine03,
- 20u,
- directions03
- },
- {
- "Bidirectional paragraphs. Update final paragraphs.",
- "Hello world demo\nhello שלום עולם world demo\nשלום بالعالم עולם مرحبا שלום עולם بالعالم hello world\nHello world demo\nhello שלום עולם world demo\nשלום بالعالم עולם مرحبا שלום עולם بالعالم hello world",
- 142u,
- 53u,
- 16u,
- bidiLine03,
- 20u,
- directions03
- },
- };
- const unsigned int numberOfTests = 6u;
-
- for( unsigned int index = 0u; index < numberOfTests; ++index )