ICU-13529 minor test code cleanup

X-SVN-Rev: 40944
This commit is contained in:
Markus Scherer 2018-02-17 00:19:25 +00:00
parent c9d3abe36f
commit 555c415e18
2 changed files with 2 additions and 2 deletions

View File

@ -2291,7 +2291,7 @@ void IntlTestRBNF::TestParseFailure() {
u"・・・・・・・・・・・・・・・・・・・・・・・・"
};
for (int i = 0; i < UPRV_LENGTHOF(testData); ++i) {
UnicodeString spelledNumberString = UnicodeString(testData[i]).unescape();
UnicodeString spelledNumberString(testData[i]);
Formattable actualNumber;
rbnf.parse(spelledNumberString, actualNumber, status);
if (status != U_INVALID_FORMAT_ERROR) { // I would have expected U_PARSE_ERROR, but NumberFormat::parse gives U_INVALID_FORMAT_ERROR

View File

@ -167,7 +167,7 @@ public class RBNFParseTest extends TestFmwk {
public void TestBadParse() {
RuleBasedNumberFormat rbnf = new RuleBasedNumberFormat(Locale.JAPAN, RuleBasedNumberFormat.SPELLOUT);
String[] testData = {
"\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB\u30FB",
"・・・・・・・・・・・・・・・・・・・・・・・・",
};
for (String testString : testData) {