From 45b8834e7ac1fd746bc3dd7bef1dde4da640dddb Mon Sep 17 00:00:00 2001 From: Craig Cornelius Date: Thu, 4 Feb 2021 13:55:40 -0800 Subject: [PATCH] ICU-21440 letest updated to true/false from TRUE/FALSE --- icu4c/source/test/letest/cletest.c | 42 +++++++++++----------- icu4c/source/test/letest/cletest.sln | 2 +- icu4c/source/test/letest/gendata.cpp | 2 +- icu4c/source/test/letest/gendata.sln | 2 +- icu4c/source/test/letest/letest.cpp | 50 +++++++++++++------------- icu4c/source/test/letest/letest.sln | 2 +- icu4c/source/test/letest/xmlreader.cpp | 8 ++--- 7 files changed, 54 insertions(+), 54 deletions(-) diff --git a/icu4c/source/test/letest/cletest.c b/icu4c/source/test/letest/cletest.c index 3839d1ee5ae..fc865886906 100644 --- a/icu4c/source/test/letest/cletest.c +++ b/icu4c/source/test/letest/cletest.c @@ -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); diff --git a/icu4c/source/test/letest/cletest.sln b/icu4c/source/test/letest/cletest.sln index 323eb6d29bd..2054f4b7401 100644 --- a/icu4c/source/test/letest/cletest.sln +++ b/icu4c/source/test/letest/cletest.sln @@ -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 diff --git a/icu4c/source/test/letest/gendata.cpp b/icu4c/source/test/letest/gendata.cpp index a9c5da56a1d..0f4cf1a5904 100644 --- a/icu4c/source/test/letest/gendata.cpp +++ b/icu4c/source/test/letest/gendata.cpp @@ -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); diff --git a/icu4c/source/test/letest/gendata.sln b/icu4c/source/test/letest/gendata.sln index 18c4f220ed9..23bf47eb22a 100644 --- a/icu4c/source/test/letest/gendata.sln +++ b/icu4c/source/test/letest/gendata.sln @@ -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 diff --git a/icu4c/source/test/letest/letest.cpp b/icu4c/source/test/letest/letest.cpp index 35c326f7e3f..ff15c938cf6 100644 --- a/icu4c/source/test/letest/letest.cpp +++ b/icu4c/source/test/letest/letest.cpp @@ -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; diff --git a/icu4c/source/test/letest/letest.sln b/icu4c/source/test/letest/letest.sln index 70066716f3a..aebf8695e93 100644 --- a/icu4c/source/test/letest/letest.sln +++ b/icu4c/source/test/letest/letest.sln @@ -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 diff --git a/icu4c/source/test/letest/xmlreader.cpp b/icu4c/source/test/letest/xmlreader.cpp index a5e04031fa0..eb469792a46 100644 --- a/icu4c/source/test/letest/xmlreader.cpp +++ b/icu4c/source/test/letest/xmlreader.cpp @@ -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);