diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp index 2c54a696c48..3c8db219d59 100644 --- a/icu4c/source/test/intltest/numfmtst.cpp +++ b/icu4c/source/test/intltest/numfmtst.cpp @@ -156,6 +156,7 @@ void NumberFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &n TESTCASE_AUTO(TestFormatAttributes); TESTCASE_AUTO(TestFieldPositionIterator); TESTCASE_AUTO(TestDecimal); + TESTCASE_AUTO(TestDecimalFormatParse7E); TESTCASE_AUTO(TestCurrencyFractionDigits); TESTCASE_AUTO(TestExponentParse); TESTCASE_AUTO(TestExplicitParents); @@ -6980,6 +6981,15 @@ void NumberFormatTest::TestDecimal() { #endif } +void NumberFormatTest::TestDecimalFormatParse7E() { + UErrorCode status = U_ZERO_ERROR; + UnicodeString testdata = u"~"; + icu::Formattable result; + icu::DecimalFormat dfmt(testdata, status); + if (U_SUCCESS(status)) { + dfmt.parse(testdata, result, status); + } +} void NumberFormatTest::TestCurrencyFractionDigits() { UErrorCode status = U_ZERO_ERROR; diff --git a/icu4c/source/test/intltest/numfmtst.h b/icu4c/source/test/intltest/numfmtst.h index 634536fff7c..bf2a9a0f945 100644 --- a/icu4c/source/test/intltest/numfmtst.h +++ b/icu4c/source/test/intltest/numfmtst.h @@ -201,6 +201,7 @@ class NumberFormatTest: public CalendarTimeZoneTest { void TestLenientParse(); void TestDecimal(); + void TestDecimalFormatParse7E(); void TestCurrencyFractionDigits(); void TestExponentParse();