ICU-21355 Fixed UCONFIG_NO_FORMATTING=1 build issue for ICU 68.1 release.
diff --git a/icu4c/source/test/cintltst/cloctst.c b/icu4c/source/test/cintltst/cloctst.c
index 373c2d5..52a5987 100644
--- a/icu4c/source/test/cintltst/cloctst.c
+++ b/icu4c/source/test/cintltst/cloctst.c
@@ -1243,6 +1243,7 @@
static void TestIllegalArgumentWhenNoDataWithNoSubstitute()
{
+#if !UCONFIG_NO_FORMATTING
UErrorCode status = U_ZERO_ERROR;
UChar getName[kDisplayNameBracketsMax];
UDisplayContext contexts[] = {
@@ -1299,6 +1300,7 @@
}
uldn_close(ldn);
+#endif
}
/*------------------------------
diff --git a/icu4c/source/test/iotest/iotest.cpp b/icu4c/source/test/iotest/iotest.cpp
index 7ef3cca..1e7716a 100644
--- a/icu4c/source/test/iotest/iotest.cpp
+++ b/icu4c/source/test/iotest/iotest.cpp
@@ -362,6 +362,7 @@
U_CDECL_BEGIN
static void U_CALLCONV ScanfMultipleIntegers(void)
{
+#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_FILE_IO
UnicodeString input = UNICODE_STRING("[1.2.3]", 7);
UnicodeString fmt = UNICODE_STRING("[%d.%d.%d]", 10);
DataDrivenLogger logger;
@@ -391,6 +392,7 @@
log_err("error in scanfmultipleintegers test 'result' Got: %d Exp: %d\n",
result, expectedResult);
}
+#endif
}
U_CDECL_END
@@ -732,8 +734,8 @@
addTest(root, &DataDrivenPrintf, "datadriv/DataDrivenPrintf");
addTest(root, &DataDrivenPrintfPrecision, "datadriv/DataDrivenPrintfPrecision");
addTest(root, &DataDrivenScanf, "datadriv/DataDrivenScanf");
-#endif
addTest(root, &ScanfMultipleIntegers, "ScanfMultipleIntegers");
+#endif
addStreamTests(root);
}