mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 18:25:57 +00:00
ICU-4092 Improve code coverage
X-SVN-Rev: 17052
This commit is contained in:
parent
d8646520af
commit
15e60bf6ee
1 changed files with 15 additions and 0 deletions
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue