mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 14:31:31 +00:00
ICU-21440 letest updated to true/false from TRUE/FALSE
This commit is contained in:
parent
412ac386f4
commit
45b8834e7a
7 changed files with 54 additions and 54 deletions
|
@ -125,45 +125,45 @@ static void U_CALLCONV ParamTest(void)
|
|||
DELETE_ARRAY(glyphs);
|
||||
|
||||
status = LE_NO_ERROR;
|
||||
glyphCount = le_layoutChars(engine, NULL, 0, 0, 0, FALSE, 0.0, 0.0, &status);
|
||||
glyphCount = le_layoutChars(engine, NULL, 0, 0, 0, false, 0.0, 0.0, &status);
|
||||
|
||||
if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
|
||||
log_err("Calling layoutChars(NULL, 0, 0, 0, FALSE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
log_err("Calling layoutChars(NULL, 0, 0, 0, false, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
}
|
||||
|
||||
status = LE_NO_ERROR;
|
||||
glyphCount = le_layoutChars(engine, chars, -1, 6, 20, TRUE, 0.0, 0.0, &status);
|
||||
glyphCount = le_layoutChars(engine, chars, -1, 6, 20, true, 0.0, 0.0, &status);
|
||||
|
||||
if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
|
||||
log_err("Calling layoutChars(chars, -1, 6, 20, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
log_err("Calling layoutChars(chars, -1, 6, 20, true, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
}
|
||||
|
||||
status = LE_NO_ERROR;
|
||||
glyphCount = le_layoutChars(engine, chars, 8, -1, 20, TRUE, 0.0, 0.0, &status);
|
||||
glyphCount = le_layoutChars(engine, chars, 8, -1, 20, true, 0.0, 0.0, &status);
|
||||
|
||||
if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
|
||||
log_err("Calling layoutChars(chars, 8, -1, 20, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
log_err("Calling layoutChars(chars, 8, -1, 20, true, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
}
|
||||
|
||||
status = LE_NO_ERROR;
|
||||
glyphCount = le_layoutChars(engine, chars, 8, 6, -1, TRUE, 0.0, 0.0, &status);
|
||||
glyphCount = le_layoutChars(engine, chars, 8, 6, -1, true, 0.0, 0.0, &status);
|
||||
|
||||
if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
|
||||
log_err("Calling layoutChars((chars, 8, 6, -1, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
log_err("Calling layoutChars((chars, 8, 6, -1, true, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
}
|
||||
|
||||
status = LE_NO_ERROR;
|
||||
glyphCount = le_layoutChars(engine, chars, 8, 6, 10, TRUE, 0.0, 0.0, &status);
|
||||
glyphCount = le_layoutChars(engine, chars, 8, 6, 10, true, 0.0, 0.0, &status);
|
||||
|
||||
if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
|
||||
log_err("Calling layoutChars(chars, 8, 6, 10, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
log_err("Calling layoutChars(chars, 8, 6, 10, true, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
}
|
||||
|
||||
status = LE_NO_ERROR;
|
||||
glyphCount = le_layoutChars(engine, chars, 8, 6, 20, TRUE, 0.0, 0.0, &status);
|
||||
glyphCount = le_layoutChars(engine, chars, 8, 6, 20, true, 0.0, 0.0, &status);
|
||||
|
||||
if (LE_FAILURE(status)) {
|
||||
log_err("Calling layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status) failed.\n");
|
||||
log_err("Calling layoutChars(chars, 8, 6, 20, true, 0.0, 0.0, status) failed.\n");
|
||||
goto bail;
|
||||
}
|
||||
|
||||
|
@ -230,10 +230,10 @@ static void U_CALLCONV AccessTest(void)
|
|||
goto bail;
|
||||
}
|
||||
|
||||
glyphCount = le_layoutChars(engine, chars, 8, 6, 20, TRUE, 0.0, 0.0, &status);
|
||||
glyphCount = le_layoutChars(engine, chars, 8, 6, 20, true, 0.0, 0.0, &status);
|
||||
|
||||
if (LE_FAILURE(status) || glyphCount != 6) {
|
||||
log_err("layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status) failed.\n");
|
||||
log_err("layoutChars(chars, 8, 6, 20, true, 0.0, 0.0, status) failed.\n");
|
||||
goto bail;
|
||||
}
|
||||
|
||||
|
@ -293,14 +293,14 @@ static le_bool compareResults(const char *testID, TestResult *expected, TestResu
|
|||
if (actual->glyphCount != expected->glyphCount) {
|
||||
log_err("Test %s: incorrect glyph count: exptected %d, got %d\n",
|
||||
testID, expected->glyphCount, actual->glyphCount);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (i = 0; i < actual->glyphCount; i += 1) {
|
||||
if (actual->glyphs[i] != expected->glyphs[i]) {
|
||||
log_err("Test %s: incorrect id for glyph %d: expected %4X, got %4X\n",
|
||||
testID, i, expected->glyphs[i], actual->glyphs[i]);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ static le_bool compareResults(const char *testID, TestResult *expected, TestResu
|
|||
if (actual->indices[i] != expected->indices[i]) {
|
||||
log_err("Test %s: incorrect index for glyph %d: expected %8X, got %8X\n",
|
||||
testID, i, expected->indices[i], actual->indices[i]);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -319,7 +319,7 @@ static le_bool compareResults(const char *testID, TestResult *expected, TestResu
|
|||
if (xError > 0.0001) {
|
||||
log_err("Test %s: incorrect x position for glyph %d: expected %f, got %f\n",
|
||||
testID, i, expected->positions[i * 2], actual->positions[i * 2]);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (yError < 0) {
|
||||
|
@ -329,11 +329,11 @@ static le_bool compareResults(const char *testID, TestResult *expected, TestResu
|
|||
if (yError > 0.0001) {
|
||||
log_err("Test %s: incorrect y position for glyph %d: expected %f, got %f\n",
|
||||
testID, i, expected->positions[i * 2 + 1], actual->positions[i * 2 + 1]);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void checkFontVersion(le_font *font, const char *testVersionString,
|
||||
|
@ -652,7 +652,7 @@ static void U_CALLCONV GlyphToCharTest(void)
|
|||
fontRuns = pl_openEmptyFontRuns(0);
|
||||
pl_addFontRun(fontRuns, font, charCount);
|
||||
|
||||
paragraph = pl_create(chars, charCount, fontRuns, NULL, NULL, NULL, 0, FALSE, &status);
|
||||
paragraph = pl_create(chars, charCount, fontRuns, NULL, NULL, NULL, 0, false, &status);
|
||||
|
||||
pl_closeFontRuns(fontRuns);
|
||||
|
||||
|
|
|
@ -21,6 +21,6 @@ Global
|
|||
{798E3AE4-A984-43FF-8928-EACFF43F56AE}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
HideSolutionNode = false
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -283,7 +283,7 @@ int main(int argc, char *argv[])
|
|||
} else if (tag.compare(test_text) == 0) {
|
||||
char *utf8 = NULL;
|
||||
|
||||
text = element->getText(TRUE);
|
||||
text = element->getText(true);
|
||||
charCount = text.length();
|
||||
|
||||
utf8 = getUTF8String(&text);
|
||||
|
|
|
@ -20,6 +20,6 @@ Global
|
|||
{DA322426-C37C-4909-A99D-16B05E7FA498}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
HideSolutionNode = false
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -146,10 +146,10 @@ static void U_CALLCONV ParamTest(void)
|
|||
DELETE_ARRAY(glyphs);
|
||||
|
||||
status = LE_NO_ERROR;
|
||||
glyphCount = engine->layoutChars(NULL, 0, 0, 0, FALSE, 0.0, 0.0, status);
|
||||
glyphCount = engine->layoutChars(NULL, 0, 0, 0, false, 0.0, 0.0, status);
|
||||
|
||||
if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
|
||||
log_err("Calling layoutChars(NULL, 0, 0, 0, FALSE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
log_err("Calling layoutChars(NULL, 0, 0, 0, false, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
}
|
||||
|
||||
LEUnicode chars[] = {
|
||||
|
@ -159,40 +159,40 @@ static void U_CALLCONV ParamTest(void)
|
|||
};
|
||||
|
||||
status = LE_NO_ERROR;
|
||||
glyphCount = engine->layoutChars(chars, -1, 6, 20, TRUE, 0.0, 0.0, status);
|
||||
glyphCount = engine->layoutChars(chars, -1, 6, 20, true, 0.0, 0.0, status);
|
||||
|
||||
if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
|
||||
log_err("Calling layoutChars(chars, -1, 6, 20, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
log_err("Calling layoutChars(chars, -1, 6, 20, true, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
}
|
||||
|
||||
status = LE_NO_ERROR;
|
||||
glyphCount = engine->layoutChars(chars, 8, -1, 20, TRUE, 0.0, 0.0, status);
|
||||
glyphCount = engine->layoutChars(chars, 8, -1, 20, true, 0.0, 0.0, status);
|
||||
|
||||
if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
|
||||
log_err("Calling layoutChars(chars, 8, -1, 20, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
log_err("Calling layoutChars(chars, 8, -1, 20, true, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
}
|
||||
|
||||
status = LE_NO_ERROR;
|
||||
glyphCount = engine->layoutChars(chars, 8, 6, -1, TRUE, 0.0, 0.0, status);
|
||||
glyphCount = engine->layoutChars(chars, 8, 6, -1, true, 0.0, 0.0, status);
|
||||
|
||||
if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
|
||||
log_err("Calling layoutChars((chars, 8, 6, -1, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
log_err("Calling layoutChars((chars, 8, 6, -1, true, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
}
|
||||
|
||||
status = LE_NO_ERROR;
|
||||
glyphCount = engine->layoutChars(chars, 8, 6, 10, TRUE, 0.0, 0.0, status);
|
||||
glyphCount = engine->layoutChars(chars, 8, 6, 10, true, 0.0, 0.0, status);
|
||||
|
||||
if (status != LE_ILLEGAL_ARGUMENT_ERROR) {
|
||||
log_err("Calling layoutChars(chars, 8, 6, 10, TRUE, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
log_err("Calling layoutChars(chars, 8, 6, 10, true, 0.0, 0.0, status) did not fail w/ LE_ILLEGAL_ARGUMENT_ERROR.\n");
|
||||
}
|
||||
|
||||
float x = 0.0, y = 0.0;
|
||||
|
||||
status = LE_NO_ERROR;
|
||||
glyphCount = engine->layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status);
|
||||
glyphCount = engine->layoutChars(chars, 8, 6, 20, true, 0.0, 0.0, status);
|
||||
|
||||
if (LE_FAILURE(status)) {
|
||||
log_err("Calling layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status) failed.\n");
|
||||
log_err("Calling layoutChars(chars, 8, 6, 20, true, 0.0, 0.0, status) failed.\n");
|
||||
goto bail;
|
||||
}
|
||||
|
||||
|
@ -258,10 +258,10 @@ static void U_CALLCONV AccessTest(void)
|
|||
goto bail;
|
||||
}
|
||||
|
||||
glyphCount = engine->layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status);
|
||||
glyphCount = engine->layoutChars(chars, 8, 6, 20, true, 0.0, 0.0, status);
|
||||
|
||||
if (LE_FAILURE(status) || glyphCount != 6) {
|
||||
log_err("layoutChars(chars, 8, 6, 20, TRUE, 0.0, 0.0, status) failed.\n");
|
||||
log_err("layoutChars(chars, 8, 6, 20, true, 0.0, 0.0, status) failed.\n");
|
||||
goto bail;
|
||||
}
|
||||
|
||||
|
@ -333,7 +333,7 @@ le_bool compareResults(const char *testID, TestResult *expected, TestResult *act
|
|||
if (actual->glyphCount != expected->glyphCount) {
|
||||
log_err("Test %s: incorrect glyph count: exptected %d, got %d\n",
|
||||
testID, expected->glyphCount, actual->glyphCount);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
le_int32 i;
|
||||
|
@ -342,7 +342,7 @@ le_bool compareResults(const char *testID, TestResult *expected, TestResult *act
|
|||
if (actual->glyphs[i] != expected->glyphs[i]) {
|
||||
log_err("Test %s: incorrect id for glyph %d: expected %4X, got %4X\n",
|
||||
testID, i, expected->glyphs[i], actual->glyphs[i]);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -350,7 +350,7 @@ le_bool compareResults(const char *testID, TestResult *expected, TestResult *act
|
|||
if (actual->indices[i] != expected->indices[i]) {
|
||||
log_err("Test %s: incorrect index for glyph %d: expected %8X, got %8X\n",
|
||||
testID, i, expected->indices[i], actual->indices[i]);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -360,7 +360,7 @@ le_bool compareResults(const char *testID, TestResult *expected, TestResult *act
|
|||
if (xError > 0.0001) {
|
||||
log_err("Test %s: incorrect x position for glyph %d: expected %f, got %f\n",
|
||||
testID, i, expected->positions[i * 2], actual->positions[i * 2]);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
double yError = uprv_fabs(actual->positions[i * 2 + 1] - expected->positions[i * 2 + 1]);
|
||||
|
@ -372,11 +372,11 @@ le_bool compareResults(const char *testID, TestResult *expected, TestResult *act
|
|||
if (yError > 0.0001) {
|
||||
log_err("Test %s: incorrect y position for glyph %d: expected %f, got %f\n",
|
||||
testID, i, expected->positions[i * 2 + 1], actual->positions[i * 2 + 1]);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void checkFontVersion(PortableFontInstance *fontInstance, const char *testVersionString,
|
||||
|
@ -652,14 +652,14 @@ static void U_CALLCONV DataDrivenTest(void)
|
|||
goto free_c_strings;
|
||||
}
|
||||
} else if (tag.compare(test_text) == 0) {
|
||||
text = element->getText(TRUE);
|
||||
text = element->getText(true);
|
||||
charCount = text.length();
|
||||
} else if (tag.compare(result_glyphs) == 0) {
|
||||
glyphs = element->getText(TRUE);
|
||||
glyphs = element->getText(true);
|
||||
} else if (tag.compare(result_indices) == 0) {
|
||||
indices = element->getText(TRUE);
|
||||
indices = element->getText(true);
|
||||
} else if (tag.compare(result_positions) == 0) {
|
||||
positions = element->getText(TRUE);
|
||||
positions = element->getText(true);
|
||||
} else {
|
||||
// an unknown tag...
|
||||
char *cTag = getCString(&tag);
|
||||
|
@ -885,7 +885,7 @@ static void U_CALLCONV GlyphToCharTest(void)
|
|||
|
||||
fontRuns.add(font, charCount);
|
||||
|
||||
paragraphLayout = new ParagraphLayout(chars, charCount, &fontRuns, NULL, NULL, NULL, 0, FALSE, status);
|
||||
paragraphLayout = new ParagraphLayout(chars, charCount, &fontRuns, NULL, NULL, NULL, 0, false, status);
|
||||
|
||||
if (LE_FAILURE(status)) {
|
||||
goto close_font;
|
||||
|
|
|
@ -35,6 +35,6 @@ Global
|
|||
{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
HideSolutionNode = false
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -208,14 +208,14 @@ void readTestFile(const char *testFilePath, TestCaseCallback callback)
|
|||
fontCksum = getCString(element->getAttribute(cksum_attr));
|
||||
|
||||
} else if (tag.compare(test_text) == 0) {
|
||||
text = element->getText(TRUE);
|
||||
text = element->getText(true);
|
||||
charCount = text.length();
|
||||
} else if (tag.compare(result_glyphs) == 0) {
|
||||
glyphs = element->getText(TRUE);
|
||||
glyphs = element->getText(true);
|
||||
} else if (tag.compare(result_indices) == 0) {
|
||||
indices = element->getText(TRUE);
|
||||
indices = element->getText(true);
|
||||
} else if (tag.compare(result_positions) == 0) {
|
||||
positions = element->getText(TRUE);
|
||||
positions = element->getText(true);
|
||||
} else {
|
||||
// an unknown tag...
|
||||
char *cTag = getCString(&tag);
|
||||
|
|
Loading…
Add table
Reference in a new issue