mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-4605 Increase code coverage.
X-SVN-Rev: 18078
This commit is contained in:
parent
aa81b91592
commit
22265da204
1 changed files with 14 additions and 0 deletions
|
@ -279,6 +279,7 @@ static void TestLocalizedString(void) {
|
|||
|
||||
u_fprintf(strFile, "%d", 1234);
|
||||
u_frewind(strFile);
|
||||
numResult = -1;
|
||||
u_fscanf(strFile, "%d", &numResult);
|
||||
u_fclose(strFile);
|
||||
u_uastrcpy(uBuffer,"1.234");
|
||||
|
@ -289,6 +290,19 @@ static void TestLocalizedString(void) {
|
|||
if (numResult != 1234) {
|
||||
log_err("u_fscanf failed to work on a de string Got: %d\n", numResult);
|
||||
}
|
||||
|
||||
strFile = u_fstropen(testStr, sizeof(testStr)/sizeof(testStr[0]), NULL);
|
||||
u_fprintf(strFile, "%d", 1234);
|
||||
u_frewind(strFile);
|
||||
numResult = -1;
|
||||
u_fscanf(strFile, "%d", &numResult);
|
||||
u_fclose(strFile);
|
||||
if (numResult != 1234) {
|
||||
log_err("u_fscanf failed to work on a default locale string Got: %d, Expected: 1234\n", numResult);
|
||||
}
|
||||
if (u_fstropen(testStr, -1, NULL) != NULL) {
|
||||
log_err("u_fstropen returned a UFILE* on a negative buffer size\n", numResult);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue