ICU-4092 Improve code coverage

X-SVN-Rev: 17052
This commit is contained in:
George Rhoten 2004-12-31 00:40:17 +00:00
parent d8646520af
commit 15e60bf6ee

View file

@ -388,6 +388,21 @@ static void TestUDataSetAppData(){
goto cleanupAndReturn;
}
/*
* First we try some monkey business and try to do bad things.
*/
status=U_ZERO_ERROR;
udata_setAppData("appData1", NULL, &status);
if (status != U_ILLEGAL_ARGUMENT_ERROR) {
log_err("FAIL: TestUDataSetAppData(): udata_setAppData(\"appData1\", NULL, status) should have failed."
" It returned status of %s\n", u_errorName(status));
goto cleanupAndReturn;
}
/* The following call should fail.
If the following works with a bad UErrorCode, then later calls to appData1 should fail. */
udata_setAppData("appData1", fileBuf, &status);
/*
* Got testdata.dat into memory, now we try setAppData using the memory image.
*/