| OLD | NEW |
| 1 /******************************************************************** | 1 /******************************************************************** |
| 2 * Copyright (c) 1997-2009, International Business Machines | 2 * Copyright (c) 1997-2014, International Business Machines |
| 3 * Corporation and others. All Rights Reserved. | 3 * Corporation and others. All Rights Reserved. |
| 4 ********************************************************************/ | 4 ********************************************************************/ |
| 5 | 5 |
| 6 #include "unicode/utypes.h" | 6 #include "unicode/utypes.h" |
| 7 | 7 |
| 8 #include "cstring.h" | 8 #include "cstring.h" |
| 9 #include "unicode/unistr.h" | 9 #include "unicode/unistr.h" |
| 10 #include "unicode/resbund.h" | 10 #include "unicode/resbund.h" |
| 11 #include "restsnew.h" | 11 #include "restsnew.h" |
| 12 | 12 |
| (...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 if(U_FAILURE(status)) | 1023 if(U_FAILURE(status)) |
| 1024 { | 1024 { |
| 1025 dataerrln("Could not load testdata.dat %s \n",u_errorName(status)); | 1025 dataerrln("Could not load testdata.dat %s \n",u_errorName(status)); |
| 1026 return; | 1026 return; |
| 1027 } | 1027 } |
| 1028 | 1028 |
| 1029 ResourceBundle theBundle(testdatapath, "testtypes", status); | 1029 ResourceBundle theBundle(testdatapath, "testtypes", status); |
| 1030 ResourceBundle bundle(testdatapath, Locale("te_IN"),status); | 1030 ResourceBundle bundle(testdatapath, Locale("te_IN"),status); |
| 1031 | 1031 |
| 1032 UnicodeString emptyStr = theBundle.getStringEx("emptystring", status); | 1032 UnicodeString emptyStr = theBundle.getStringEx("emptystring", status); |
| 1033 if(!emptyStr.length()==0) { | 1033 if(emptyStr.length() != 0) { |
| 1034 logln("Empty string returned invalid value\n"); | 1034 logln("Empty string returned invalid value\n"); |
| 1035 } | 1035 } |
| 1036 | 1036 |
| 1037 CONFIRM_UErrorCode(status, U_ZERO_ERROR); | 1037 CONFIRM_UErrorCode(status, U_ZERO_ERROR); |
| 1038 | 1038 |
| 1039 /* This test reads the string "abc\u0000def" from the bundle */ | 1039 /* This test reads the string "abc\u0000def" from the bundle */ |
| 1040 /* if everything is working correctly, the size of this string */ | 1040 /* if everything is working correctly, the size of this string */ |
| 1041 /* should be 7. Everything else is a wrong answer, esp. 3 and 6*/ | 1041 /* should be 7. Everything else is a wrong answer, esp. 3 and 6*/ |
| 1042 | 1042 |
| 1043 strcpy(action, "getting and testing of string with embeded zero"); | 1043 strcpy(action, "getting and testing of string with embeded zero"); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 ResourceBundle rootRes(NULL, "root", status); | 1176 ResourceBundle rootRes(NULL, "root", status); |
| 1177 rootRes.getWithFallback("calendar", status).getWithFallback("islamic-civil",
status).getWithFallback("DateTime", status); | 1177 rootRes.getWithFallback("calendar", status).getWithFallback("islamic-civil",
status).getWithFallback("DateTime", status); |
| 1178 if(U_SUCCESS(status)) { | 1178 if(U_SUCCESS(status)) { |
| 1179 errln("Root's Islamic-civil's DateTime resource exists. How did it get h
ere?\n"); | 1179 errln("Root's Islamic-civil's DateTime resource exists. How did it get h
ere?\n"); |
| 1180 } | 1180 } |
| 1181 status = U_ZERO_ERROR; | 1181 status = U_ZERO_ERROR; |
| 1182 | 1182 |
| 1183 } | 1183 } |
| 1184 //eof | 1184 //eof |
| 1185 | 1185 |
| OLD | NEW |