ICU-460 OS/390 porting fixes

X-SVN-Rev: 2294
This commit is contained in:
Vladimir Weinstein 2000-08-16 20:45:23 +00:00
parent 63880d0371
commit 82781d6967
4 changed files with 8 additions and 3 deletions

View file

@ -150,6 +150,7 @@ struct UResourceBundle;
typedef struct UResourceBundle UResourceBundle;
typedef enum {
RES_NONE=-1,
RES_STRING=0,
RES_BINARY=1,
RES_TABLE=2,

View file

@ -536,7 +536,7 @@ U_CAPI uint32_t U_EXPORT2 ures_getInt(const UResourceBundle* resB, UErrorCode *s
U_CAPI UResType U_EXPORT2 ures_getType(UResourceBundle *resB) {
if(resB == NULL) {
return (UResType) RES_BOGUS;
return RES_NONE;
}
return (UResType) (RES_GET_TYPE(resB->fRes));
}

View file

@ -470,8 +470,8 @@ void TestErrorConditions(){
}
/*Test ures_getType() with UResourceBundle = NULL should return RES_BOGUS or -1*/
status=U_ZERO_ERROR;
if(ures_getType(NULL) != -1){
log_err("ERROR: ures_getType() should return RES_BOGUS when UResourceBundle=NULL. Got =%d\n", ures_getType(NULL));
if(ures_getType(NULL) != RES_NONE){
log_err("ERROR: ures_getType() should return RES_NONE when UResourceBundle=NULL. Got =%d\n", ures_getType(NULL));
}
/*Test ures_getKey() with UResourceBundle = NULL*/
status=U_ZERO_ERROR;

View file

@ -267,7 +267,11 @@ void TestPUtilAPI(){
expn1=uprv_nextDouble(uprv_getNaN(), TRUE);
doAssert(expn1, uprv_getNaN(), "uprv_nextDouble(uprv_getNaN(), TRUE) failed.");
#ifdef OS390
#if IEEE_754
y1=4.9406564584125e-324;
#else
y1=4.9406564584125e-78;
#endif
#else
y1=4.9406564584125e-324;
#endif