ICU-4605 Increase code coverage.

X-SVN-Rev: 18078
This commit is contained in:
George Rhoten 2005-06-28 22:50:14 +00:00
parent aa81b91592
commit 22265da204

View file

@ -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
}