ICU-1872 Make the initialization error into an warning.

X-SVN-Rev: 8688
This commit is contained in:
George Rhoten 2002-05-23 23:56:47 +00:00
parent 90d29f462f
commit b89a3b00ab
2 changed files with 14 additions and 4 deletions

View File

@ -1073,6 +1073,18 @@ main(int argc, char* argv[])
fprintf(stdout, "--------------------------------------\n");
if (!MutexTest::gMutexInitialized) {
fprintf(stderr,
"#### WARNING!\n"
" The global mutex was not initialized during C++ static initialization.\n"
" You must use an ICU API in a single thread, like ucnv_open() or\n"
" uloc_countAvailable(), before using ICU in multiple threads.\n"
" Most ICU API functions will initialize the global mutex for you.\n"
" If you are using ICU in a single threaded application, please ignore this\n"
" warning.\n"
"#### WARNING!\n"
);
}
if (execCount <= 0) {
fprintf(stdout, "***** Not all called tests actually exist! *****\n");
}

View File

@ -68,15 +68,13 @@ UBool MutexTest::gMutexInitialized = FALSE;
void MutexTest::TestMutex() {
/* This is tested in intltest.cpp before anything starts. */
if (!gMutexInitialized) {
errln("*** Failure! The global mutex was not initialized.\n"
logln("*** Failure! The global mutex was not initialized.\n"
"*** Make sure the right linker was used.\n");
}
}
void MutexTest::TestLock() {
}
}