[sword-cvs] icu-sword/source/test/letest PortableFontInstance.cpp,1.4,1.5 gendata.cpp,1.3,1.4 letest.cpp,1.3,1.4 testdata.cpp,1.3,1.4

sword@www.crosswire.org sword@www.crosswire.org
Tue, 6 Apr 2004 03:10:52 -0700


Update of /cvs/core/icu-sword/source/test/letest
In directory www:/tmp/cvs-serv8911/source/test/letest

Modified Files:
	PortableFontInstance.cpp gendata.cpp letest.cpp testdata.cpp 
Log Message:
ICU 2.8 sync

Index: PortableFontInstance.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/test/letest/PortableFontInstance.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- PortableFontInstance.cpp	10 Sep 2003 02:42:50 -0000	1.4
+++ PortableFontInstance.cpp	6 Apr 2004 10:09:48 -0000	1.5
@@ -276,6 +276,6 @@
 
 le_bool PortableFontInstance::getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const
 {
-    return false;
+    return FALSE;
 }
 

Index: gendata.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/test/letest/gendata.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- gendata.cpp	10 Sep 2003 02:42:50 -0000	1.3
+++ gendata.cpp	6 Apr 2004 10:09:48 -0000	1.4
@@ -255,10 +255,10 @@
 le_int32 thaiSampleLength = ARRAY_LENGTH(thaiSample);
 
 TestInput testInputs[] = {
-    {"raghu.ttf",             devaText,   devaTextLength,   devaScriptCode, false},
-    {"CODE2000.TTF",             arabText,   arabTextLength,   arabScriptCode, true},
-    {"LucidaSansRegular.ttf", arabText,   arabTextLength,   arabScriptCode, true},
-    {"Thonburi.ttf",          thaiSample, thaiSampleLength, thaiScriptCode, false}
+    {"raghu.ttf",             devaText,   devaTextLength,   devaScriptCode, FALSE},
+    {"CODE2000.TTF",             arabText,   arabTextLength,   arabScriptCode, TRUE},
+    {"LucidaSansRegular.ttf", arabText,   arabTextLength,   arabScriptCode, TRUE},
+    {"Thonburi.ttf",          thaiSample, thaiSampleLength, thaiScriptCode, FALSE}
 };
 
 #define TEST_COUNT ARRAY_LENGTH(testInputs)
@@ -409,7 +409,7 @@
     for (test = 0; test < testCount; test += 1) {
         fprintf(outputFile, "    {\"%s\", inputText%d, %d, %sScriptCode, %s},\n",
             testInputs[test].fontName, test, testInputs[test].textLength, getShortName(testInputs[test].scriptCode),
-            testInputs[test].rightToLeft? "true" : "false");
+            testInputs[test].rightToLeft? "TRUE" : "FALSE");
     }
 
     fprintf(outputFile, "};\n\nle_int32 testCount = ARRAY_LENGTH(testInputs);\n\n");

Index: letest.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/test/letest/letest.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- letest.cpp	10 Sep 2003 02:42:50 -0000	1.3
+++ letest.cpp	6 Apr 2004 10:09:49 -0000	1.4
@@ -26,7 +26,7 @@
     /* NOTE: we'll stop on the first failure 'cause once there's one error, it may cascade... */
     if (actual->glyphCount != expected->glyphCount) {
         printf("incorrect glyph count: exptected %d, got %d\n", expected->glyphCount, actual->glyphCount);
-        return false;
+        return FALSE;
     }
 
     le_int32 i;
@@ -34,14 +34,14 @@
     for (i = 0; i < actual->glyphCount; i += 1) {
         if (actual->glyphs[i] != expected->glyphs[i]) {
             printf("incorrect id for glyph %d: expected %4X, got %4X\n", i, expected->glyphs[i], actual->glyphs[i]);
-            return false;
+            return FALSE;
         }
     }
 
     for (i = 0; i < actual->glyphCount; i += 1) {
         if (actual->indices[i] != expected->indices[i]) {
             printf("incorrect index for glyph %d: expected %8X, got %8X\n", i, expected->indices[i], actual->indices[i]);
-            return false;
+            return FALSE;
         }
     }
 
@@ -50,7 +50,7 @@
 
         if (xError > 0.0001) {
             printf("incorrect x position for glyph %d: expected %f, got %f\n", i, expected->positions[i * 2], actual->positions[i * 2]);
-            return false;
+            return FALSE;
         }
 
         double yError = fabs(actual->positions[i * 2 + 1] - expected->positions[i * 2 + 1]);
@@ -61,11 +61,11 @@
 
         if (yError > 0.0001) {
             printf("incorrect y position for glyph %d: expected %f, got %f\n", i, expected->positions[i * 2 + 1], actual->positions[i * 2 + 1]);
-            return false;
+            return FALSE;
         }
     }
 
-    return true;
+    return TRUE;
 }
 
 int main(int argc, char *argv[])

Index: testdata.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/test/letest/testdata.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- testdata.cpp	10 Sep 2003 02:42:50 -0000	1.3
+++ testdata.cpp	6 Apr 2004 10:09:49 -0000	1.4
@@ -608,10 +608,10 @@
 
 TestInput testInputs[] = 
 {
-    {"raghu.ttf", inputText0, 136, devaScriptCode, false},
-    {"CODE2000.TTF", inputText1, 252, arabScriptCode, true},
-    {"LucidaSansRegular.ttf", inputText2, 252, arabScriptCode, true},
-    {"Thonburi.ttf", inputText3, 168, thaiScriptCode, false},
+    {"raghu.ttf", inputText0, 136, devaScriptCode, FALSE},
+    {"CODE2000.TTF", inputText1, 252, arabScriptCode, TRUE},
+    {"LucidaSansRegular.ttf", inputText2, 252, arabScriptCode, TRUE},
+    {"Thonburi.ttf", inputText3, 168, thaiScriptCode, FALSE},
 };
 
 le_int32 testCount = ARRAY_LENGTH(testInputs);