| OLD | NEW |
| 1 /******************************************************************** | 1 /******************************************************************** |
| 2 * COPYRIGHT: | 2 * COPYRIGHT: |
| 3 * Copyright (c) 1997-2010, International Business Machines Corporation and | 3 * Copyright (c) 1997-2010, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
| 5 ********************************************************************/ | 5 ********************************************************************/ |
| 6 | 6 |
| 7 #include "unicode/utypes.h" | 7 #include "unicode/utypes.h" |
| 8 | 8 |
| 9 #if !UCONFIG_NO_FORMATTING | 9 #if !UCONFIG_NO_FORMATTING |
| 10 | 10 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 1.23456789}; | 175 1.23456789}; |
| 176 int dNumSize = 9; | 176 int dNumSize = 9; |
| 177 | 177 |
| 178 UErrorCode status = U_ZERO_ERROR; | 178 UErrorCode status = U_ZERO_ERROR; |
| 179 NumberFormat *nf = NumberFormat::createInstance(status); | 179 NumberFormat *nf = NumberFormat::createInstance(status); |
| 180 if (failure(status, "NumberFormat::createInstance", TRUE)){ | 180 if (failure(status, "NumberFormat::createInstance", TRUE)){ |
| 181 delete nf; | 181 delete nf; |
| 182 return; | 182 return; |
| 183 }; | 183 }; |
| 184 | 184 |
| 185 DecimalFormat *fmt = dynamic_cast<DecimalFormat *>(nf); | 185 DecimalFormat *fmt = CR_DYNAMIC_CAST<DecimalFormat *>(nf); |
| 186 if(fmt == NULL) { | 186 if(fmt == NULL) { |
| 187 errln("NumberFormat::createInstance returned unexpected class type"); | 187 errln("NumberFormat::createInstance returned unexpected class type"); |
| 188 return; | 188 return; |
| 189 } | 189 } |
| 190 fmt->setDecimalSeparatorAlwaysShown(TRUE); | 190 fmt->setDecimalSeparatorAlwaysShown(TRUE); |
| 191 | 191 |
| 192 const int tempLen = 20; | 192 const int tempLen = 20; |
| 193 UnicodeString temp; | 193 UnicodeString temp; |
| 194 | 194 |
| 195 for (int i=0; i < dNumSize; i++) { | 195 for (int i=0; i < dNumSize; i++) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 222 ParsePosition p2(3); | 222 ParsePosition p2(3); |
| 223 if (p != p2) | 223 if (p != p2) |
| 224 errln("Error : ParsePosition.equals() failed"); | 224 errln("Error : ParsePosition.equals() failed"); |
| 225 FieldPosition fp(2); | 225 FieldPosition fp(2); |
| 226 FieldPosition fp2(2); | 226 FieldPosition fp2(2); |
| 227 if (fp != fp2) | 227 if (fp != fp2) |
| 228 errln("Error : FieldPosition.equals() failed"); | 228 errln("Error : FieldPosition.equals() failed"); |
| 229 } | 229 } |
| 230 | 230 |
| 231 #endif /* #if !UCONFIG_NO_FORMATTING */ | 231 #endif /* #if !UCONFIG_NO_FORMATTING */ |
| OLD | NEW |