OLD | NEW |
1 /* | 1 /* |
2 ******************************************************************************* | 2 ******************************************************************************* |
3 * | 3 * |
4 * Copyright (C) 1999-2008, International Business Machines | 4 * Copyright (C) 1999-2014, International Business Machines |
5 * Corporation and others. All Rights Reserved. | 5 * Corporation and others. All Rights Reserved. |
6 * | 6 * |
7 ******************************************************************************* | 7 ******************************************************************************* |
8 */ | 8 */ |
9 | 9 |
| 10 #ifndef USING_ICULEHB /* C API not available under HB */ |
| 11 |
10 #include "unicode/utypes.h" | 12 #include "unicode/utypes.h" |
11 #include "unicode/ubidi.h" | 13 #include "unicode/ubidi.h" |
12 #include "unicode/uscript.h" | 14 #include "unicode/uscript.h" |
13 #include "unicode/ctest.h" | 15 #include "unicode/ctest.h" |
14 | 16 |
15 #include "layout/LETypes.h" | 17 #include "layout/LETypes.h" |
16 #include "layout/LEScripts.h" | 18 #include "layout/LEScripts.h" |
17 #include "layout/loengine.h" | 19 #include "layout/loengine.h" |
18 | 20 |
19 #include "layout/playout.h" | 21 #include "layout/playout.h" |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 * Break it into multiple lines and make sure that the glyphToCharMap for run in
each | 506 * Break it into multiple lines and make sure that the glyphToCharMap for run in
each |
505 * line is correct. | 507 * line is correct. |
506 * | 508 * |
507 * Note: it might be a good idea to also check the glyphs and positions for each
run, | 509 * Note: it might be a good idea to also check the glyphs and positions for each
run, |
508 * that we get the expected number of runs per line and that the line breaks are
where | 510 * that we get the expected number of runs per line and that the line breaks are
where |
509 * we expect them to be. Really, it would be a good idea to make a whole test su
ite | 511 * we expect them to be. Really, it would be a good idea to make a whole test su
ite |
510 * for pl_paragraph. | 512 * for pl_paragraph. |
511 */ | 513 */ |
512 static void U_CALLCONV GlyphToCharTest(void) | 514 static void U_CALLCONV GlyphToCharTest(void) |
513 { | 515 { |
| 516 #if !UCONFIG_NO_BREAK_ITERATION |
514 LEErrorCode status = LE_NO_ERROR; | 517 LEErrorCode status = LE_NO_ERROR; |
515 le_font *font; | 518 le_font *font; |
516 pl_fontRuns *fontRuns; | 519 pl_fontRuns *fontRuns; |
517 pl_paragraph *paragraph; | 520 pl_paragraph *paragraph; |
518 const pl_line *line; | 521 const pl_line *line; |
519 /* | 522 /* |
520 * This is the same text that's in <icu>/source/samples/layout/Sample.txt | 523 * This is the same text that's in <icu>/source/samples/layout/Sample.txt |
521 */ | 524 */ |
522 LEUnicode chars[] = { | 525 LEUnicode chars[] = { |
523 /*BOM*/ 0x0054, 0x0068, 0x0065, 0x0020, 0x004c, 0x0061, 0x0079, | 526 /*BOM*/ 0x0054, 0x0068, 0x0065, 0x0020, 0x004c, 0x0061, 0x0079, |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 } | 724 } |
722 | 725 |
723 close_paragraph: | 726 close_paragraph: |
724 pl_close(paragraph); | 727 pl_close(paragraph); |
725 | 728 |
726 close_font: | 729 close_font: |
727 le_fontClose(font); | 730 le_fontClose(font); |
728 | 731 |
729 finish: | 732 finish: |
730 return; | 733 return; |
| 734 #endif |
731 } | 735 } |
732 | 736 |
733 U_CFUNC void addCTests(TestNode **root) | 737 U_CFUNC void addCTests(TestNode **root) |
734 { | 738 { |
735 addTest(root, &ParamTest, "c_api/ParameterTest"); | 739 addTest(root, &ParamTest, "c_api/ParameterTest"); |
736 addTest(root, &FactoryTest, "c_api/FactoryTest"); | 740 addTest(root, &FactoryTest, "c_api/FactoryTest"); |
737 addTest(root, &AccessTest, "c_layout/AccessTest"); | 741 addTest(root, &AccessTest, "c_layout/AccessTest"); |
738 addTest(root, &DataDrivenTest, "c_layout/DataDrivenTest"); | 742 addTest(root, &DataDrivenTest, "c_layout/DataDrivenTest"); |
739 addTest(root, &GlyphToCharTest, "c_paragraph/GlyphToCharTest"); | 743 addTest(root, &GlyphToCharTest, "c_paragraph/GlyphToCharTest"); |
740 } | 744 } |
741 | 745 |
742 | 746 |
| 747 #endif |
OLD | NEW |