| com.ibm.icu.dev.test.TestFmwk com.ibm.icu.dev.test.format.NumberRegression
Method Summary | |
public void | Test4052223() Tests ParsePosition.setErrorPosition() and ParsePosition.getErrorPosition(). | public void | Test4059870() | public void | Test4061302() API tests for API addition request A9. | public void | Test4062486() API tests for API addition request A23. | public void | Test4066646() NumberFormat.getCurrencyInstance is wrong. | public void | Test4068693() | public void | Test4069754() | public void | Test4070798() | public void | Test4071005() | public void | Test4071014() | public void | Test4071492() DecimalFormat does not round up correctly. | public void | Test4071859() | public void | Test4074454() Tests illegal pattern exception. | public void | Test4074620() NumberFormat.equals comparing two obj equal even the setGroupingUsed
flag is different. | public void | Test4075713() NumberFormat.equals comparing with null should always return false. | public void | Test4083018() DecimalFormatSymbol.equals should always return false when
comparing with null. | public void | Test4086575() A space as a group separator for localized pattern causes
wrong format. | public void | Test4087244() NumberFormat.getCurrencyInstance() produces format that uses
decimal separator instead of monetary decimal separator.
Rewrote this test not to depend on the actual pattern. | public void | Test4087245() DecimalFormatSymbols should be cloned in the ctor DecimalFormat. | public void | Test4087251() | public void | Test4087535() | public void | Test4088161() DecimalFormat.format() incorrectly uses maxFractionDigits setting. | public void | Test4088503() DecimalFormat.format fails when groupingSize is set to 0. | public void | Test4090489() | public void | Test4090504() | public void | Test4092480() DecimalFormat: Negative format ignored. | public void | Test4092561() | public void | Test4093610() | public void | Test4095713() | public void | Test4098741() Tests the setMaximumFractionDigits limit. | public void | Test4099404() Tests all different comments.
Response to some comments :
[1] DecimalFormat.parse API documentation is more than just one line.
This is not a reproducable doc error in 116 source code.
[2] See updated javadoc.
[3] Fixed.
[4] NumberFormat.parse(String, ParsePosition) : If parsing fails,
a null object will be returned. | public void | Test4101481() | public void | Test4106658() DecimalFormat.format() incorrectly formats negative doubles. | public void | Test4106662() DecimalFormat.parse returns 0 if string parameter is incorrect. | public void | Test4106664() DecimalFormat.format(long n) fails if n * multiplier > MAX_LONG. | public void | Test4106667() DecimalFormat.format incorrectly formats -0.0. | public void | Test4108738() DecimalFormat.parse incorrectly works with a group separator. | public void | Test4110936() DecimalFormat.setMaximumIntegerDigits() works incorrectly. | public void | Test4114639() | public void | Test4122840() Locale data should use generic currency symbol
1) Make sure that all currency formats use the generic currency symbol. | public void | Test4125885() DecimalFormat.format() delivers wrong string. | public void | Test4134034() DecimalFormat produces extra zeros when formatting numbers. | public void | Test4134300() CANNOT REPRODUCE - This bug could not be reproduced. | public void | Test4140009() Empty pattern produces double negative prefix. | public void | Test4141750() BigDecimal numbers get their fractions truncated by NumberFormat. | public void | Test4145457() DecimalFormat toPattern() doesn't quote special characters or handle
single quotes. | public void | Test4147295() DecimalFormat.applyPattern() sets minimum integer digits incorrectly. | public void | Test4147706() | public void | Test4162198() | public void | Test4162852() NumberFormat does not parse negative zero. | public void | Test4167494() | public void | Test4170798() | public void | Test4176114() toPattern only puts the first grouping separator in. | public void | Test4179818() | public void | Test4185761() | public void | Test4212072() Some DecimalFormatSymbols changes are not picked up by DecimalFormat.
This includes the minus sign, currency symbol, international currency
symbol, percent, and permille. | public void | Test4216742() DecimalFormat.parse() fails for mulipliers 2^n. | public void | Test4217661() DecimalFormat formats 1.001 to "1.00" instead of "1" with 2 fraction
digits. | public void | Test4243011() | public void | Test4243108() | public float | assignFloatValue(float returnfloat) | public static void | main(String[] args) | void | roundingTest(DecimalFormat df, double x, String expected) | public void | test4233840() | public void | test4241880() | public void | test4330377() |
Test4052223 | public void Test4052223()(Code) | | Tests ParsePosition.setErrorPosition() and ParsePosition.getErrorPosition().
|
Test4059870 | public void Test4059870()(Code) | | DecimalFormat throws exception when parsing "0"
|
Test4061302 | public void Test4061302()(Code) | | API tests for API addition request A9.
|
Test4062486 | public void Test4062486()(Code) | | API tests for API addition request A23. FieldPosition.getBeginIndex and
FieldPosition.getEndIndex.
|
Test4066646 | public void Test4066646()(Code) | | NumberFormat.getCurrencyInstance is wrong.
|
Test4068693 | public void Test4068693()(Code) | | DecimalFormat.parse returns wrong value
|
Test4070798 | public void Test4070798()(Code) | | Number format data rounding errors for locale FR
|
Test4071005 | public void Test4071005()(Code) | | Data rounding errors for French (Canada) locale
|
Test4071014 | public void Test4071014()(Code) | | Data rounding errors for German (Germany) locale
|
Test4071492 | public void Test4071492()(Code) | | DecimalFormat does not round up correctly.
|
Test4071859 | public void Test4071859()(Code) | | Data rounding errors for Italian locale number formats
Note- with the Euro, there is no need for currency rounding anymore
|
Test4074454 | public void Test4074454()(Code) | | Tests illegal pattern exception.
Fix comment : HShih A31 Part1 will not be fixed and javadoc needs to be updated.
Part2 has been fixed.
|
Test4074620 | public void Test4074620()(Code) | | NumberFormat.equals comparing two obj equal even the setGroupingUsed
flag is different.
|
Test4075713 | public void Test4075713()(Code) | | NumberFormat.equals comparing with null should always return false.
|
Test4083018 | public void Test4083018()(Code) | | DecimalFormatSymbol.equals should always return false when
comparing with null.
|
Test4086575 | public void Test4086575()(Code) | | A space as a group separator for localized pattern causes
wrong format. WorkAround : use non-breaking space.
|
Test4087244 | public void Test4087244()(Code) | | NumberFormat.getCurrencyInstance() produces format that uses
decimal separator instead of monetary decimal separator.
Rewrote this test not to depend on the actual pattern. Pattern should
never contain the monetary separator! Decimal separator in pattern is
interpreted as monetary separator if currency symbol is seen!
|
Test4087245 | public void Test4087245()(Code) | | DecimalFormatSymbols should be cloned in the ctor DecimalFormat.
DecimalFormat(String, DecimalFormatSymbols).
|
Test4087251 | public void Test4087251()(Code) | | DecimalFormat.applyPattern(String) allows illegal patterns
|
Test4087535 | public void Test4087535()(Code) | | DecimalFormat.format() incorrectly formats 0.0
|
Test4088161 | public void Test4088161()(Code) | | DecimalFormat.format() incorrectly uses maxFractionDigits setting.
|
Test4088503 | public void Test4088503()(Code) | | DecimalFormat.format fails when groupingSize is set to 0.
|
Test4090489 | public void Test4090489()(Code) | | DecimalFormat.format() loses precision
|
Test4090504 | public void Test4090504()(Code) | | DecimalFormat.format() loses precision
|
Test4092480 | public void Test4092480()(Code) | | DecimalFormat: Negative format ignored.
|
Test4092561 | public void Test4092561()(Code) | | DecimalFormat.parse() fails when multiplier is not set to 1
|
Test4093610 | public void Test4093610()(Code) | | |
Test4095713 | public void Test4095713()(Code) | | DecimalFormat.parse(String str, ParsePosition pp) loses precision
|
Test4098741 | public void Test4098741()(Code) | | Tests the setMaximumFractionDigits limit.
|
Test4099404 | public void Test4099404()(Code) | | Tests all different comments.
Response to some comments :
[1] DecimalFormat.parse API documentation is more than just one line.
This is not a reproducable doc error in 116 source code.
[2] See updated javadoc.
[3] Fixed.
[4] NumberFormat.parse(String, ParsePosition) : If parsing fails,
a null object will be returned. The unchanged parse position also
reflects an error.
NumberFormat.parse(String) : If parsing fails, an ParseException
will be thrown.
See updated javadoc for more details.
[5] See updated javadoc.
[6] See updated javadoc.
[7] This is a correct behavior if the DateFormat object is linient.
Otherwise, an IllegalArgumentException will be thrown when formatting
"January 35". See GregorianCalendar class javadoc for more details.
|
Test4101481 | public void Test4101481()(Code) | | DecimalFormat.applyPattern doesn't set minimum integer digits
|
Test4106658 | public void Test4106658()(Code) | | DecimalFormat.format() incorrectly formats negative doubles.
|
Test4106662 | public void Test4106662()(Code) | | DecimalFormat.parse returns 0 if string parameter is incorrect.
|
Test4106664 | public void Test4106664()(Code) | | DecimalFormat.format(long n) fails if n * multiplier > MAX_LONG.
|
Test4106667 | public void Test4106667()(Code) | | DecimalFormat.format incorrectly formats -0.0.
|
Test4108738 | public void Test4108738()(Code) | | DecimalFormat.parse incorrectly works with a group separator.
|
Test4110936 | public void Test4110936()(Code) | | DecimalFormat.setMaximumIntegerDigits() works incorrectly.
|
Test4114639 | public void Test4114639()(Code) | | NumberFormat.parse doesn't return null
|
Test4122840 | public void Test4122840()(Code) | | Locale data should use generic currency symbol
1) Make sure that all currency formats use the generic currency symbol.
2) Make sure we get the same results using the generic symbol or a
hard-coded one.
|
Test4125885 | public void Test4125885()(Code) | | DecimalFormat.format() delivers wrong string.
|
Test4134034 | public void Test4134034()(Code) | | DecimalFormat produces extra zeros when formatting numbers.
|
Test4134300 | public void Test4134300()(Code) | | CANNOT REPRODUCE - This bug could not be reproduced. It may be
a duplicate of 4134034.
JDK 1.1.6 Bug, did NOT occur in 1.1.5
Possibly related to bug 4125885.
This class demonstrates a regression in version 1.1.6
of DecimalFormat class.
1.1.6 Results
Value 1.2 Format #.00 Result '01.20' !!!wrong
Value 1.2 Format 0.00 Result '001.20' !!!wrong
Value 1.2 Format 00.00 Result '0001.20' !!!wrong
Value 1.2 Format #0.0# Result '1.2'
Value 1.2 Format #0.00 Result '001.20' !!!wrong
1.1.5 Results
Value 1.2 Format #.00 Result '1.20'
Value 1.2 Format 0.00 Result '1.20'
Value 1.2 Format 00.00 Result '01.20'
Value 1.2 Format #0.0# Result '1.2'
Value 1.2 Format #0.00 Result '1.20'
|
Test4140009 | public void Test4140009()(Code) | | Empty pattern produces double negative prefix.
|
Test4141750 | public void Test4141750()(Code) | | BigDecimal numbers get their fractions truncated by NumberFormat.
|
Test4145457 | public void Test4145457()(Code) | | DecimalFormat toPattern() doesn't quote special characters or handle
single quotes.
|
Test4147295 | public void Test4147295()(Code) | | DecimalFormat.applyPattern() sets minimum integer digits incorrectly.
CANNOT REPRODUCE
This bug is a duplicate of 4139344, which is a duplicate of 4134300
|
Test4147706 | public void Test4147706()(Code) | | DecimalFormat formats -0.0 as +0.0
See also older related bug 4106658, 4106667
|
Test4162198 | public void Test4162198()(Code) | | NumberFormat cannot format Double.MAX_VALUE
|
Test4162852 | public void Test4162852() throws ParseException(Code) | | NumberFormat does not parse negative zero.
|
Test4167494 | public void Test4167494() throws Exception(Code) | | NumberFormat truncates data
|
Test4170798 | public void Test4170798()(Code) | | DecimalFormat.parse() fails when ParseIntegerOnly set to true
|
Test4176114 | public void Test4176114()(Code) | | toPattern only puts the first grouping separator in.
|
Test4179818 | public void Test4179818()(Code) | | DecimalFormat is incorrectly rounding numbers like 1.2501 to 1.2
|
Test4212072 | public void Test4212072() throws IOException, ClassNotFoundException(Code) | | Some DecimalFormatSymbols changes are not picked up by DecimalFormat.
This includes the minus sign, currency symbol, international currency
symbol, percent, and permille. This is filed as bugs 4212072 and
4212073.
|
Test4216742 | public void Test4216742() throws ParseException(Code) | | DecimalFormat.parse() fails for mulipliers 2^n.
|
Test4217661 | public void Test4217661()(Code) | | DecimalFormat formats 1.001 to "1.00" instead of "1" with 2 fraction
digits.
|
Test4243011 | public void Test4243011()(Code) | | 4243011: Formatting .5 rounds to "1" instead of "0"
|
Test4243108 | public void Test4243108()(Code) | | 4243108: format(0.0) gives "0.1" if preceded by parse("99.99")
|
assignFloatValue | public float assignFloatValue(float returnfloat)(Code) | | |
test4233840 | public void test4233840()(Code) | | 4233840: NumberFormat does not round correctly
|
test4241880 | public void test4241880()(Code) | | 4241880: Decimal format doesnt round a double properly when the number is less than 1
|
test4330377 | public void test4330377()(Code) | | 4330377: DecimalFormat engineering notation gives incorrect results
|
Fields inherited from com.ibm.icu.dev.test.TestFmwk | protected TestParams params(Code)(Java Doc)
|
Methods inherited from com.ibm.icu.dev.test.TestFmwk | protected boolean assertEquals(String message, boolean expected, boolean actual)(Code)(Java Doc) protected boolean assertEquals(String message, long expected, long actual)(Code)(Java Doc) protected boolean assertEquals(String message, float expected, float actual, double error)(Code)(Java Doc) protected boolean assertEquals(String message, double expected, double actual, double error)(Code)(Java Doc) protected boolean assertEquals(String message, Object expected, Object actual)(Code)(Java Doc) protected boolean assertFalse(String message, boolean condition)(Code)(Java Doc) protected boolean assertNotEquals(String message, Object expected, Object actual)(Code)(Java Doc) protected boolean assertNotNull(String message, Object actual)(Code)(Java Doc) protected boolean assertNotSame(String message, Object expected, Object actual)(Code)(Java Doc) protected boolean assertNull(String message, Object actual)(Code)(Java Doc) protected boolean assertSame(String message, Object expected, Object actual)(Code)(Java Doc) protected boolean assertTrue(String message, boolean condition)(Code)(Java Doc) protected int checkArray(String msg, String array, String expected)(Code)(Java Doc) protected int checkArray(String msg, Locale array, String expected)(Code)(Java Doc) protected int checkArray(String msg, ULocale array, String expected)(Code)(Java Doc) protected Random createRandom()(Code)(Java Doc) protected void fail(String message)(Code)(Java Doc) protected static synchronized java.util.Date getDate(int year, int month, int dom)(Code)(Java Doc) protected String getDescription()(Code)(Java Doc) protected int getErrorCount()(Code)(Java Doc) public PrintWriter getErrorLogPrintWriter()(Code)(Java Doc) public int getInclusion()(Code)(Java Doc) public PrintWriter getLogPrintWriter()(Code)(Java Doc) protected String getMethodDescription(String name)(Code)(Java Doc) protected TestFmwk getSubtest(String prefix) throws TestFmwkException(Code)(Java Doc) protected Target getTargets(String targetName)(Code)(Java Doc) public String getTranslitTestFilter()(Code)(Java Doc) protected void handleException(Throwable e)(Code)(Java Doc) public static String hex(char[] s)(Code)(Java Doc) public static String hex(byte[] s)(Code)(Java Doc) public static String hex(char ch)(Code)(Java Doc) public static String hex(int ch)(Code)(Java Doc) public static String hex(String s)(Code)(Java Doc) public static String hex(StringBuffer s)(Code)(Java Doc) protected void init() throws Exception(Code)(Java Doc) public boolean isDateAtLeast(int year, int month, int day)(Code)(Java Doc) public boolean isMemTracking()(Code)(Java Doc) public boolean isModularBuild()(Code)(Java Doc) public boolean isQuick()(Code)(Java Doc) public boolean isTiming()(Code)(Java Doc) public boolean isVerbose()(Code)(Java Doc) public void msg(String message, int level, boolean incCount, boolean newln)(Code)(Java Doc) public boolean noData()(Code)(Java Doc) public static String prettify(String s)(Code)(Java Doc) public static String prettify(StringBuffer s)(Code)(Java Doc) public Target resolveTarget(TestParams params)(Code)(Java Doc) public Target resolveTarget(TestParams params, String targetPath)(Code)(Java Doc) public void run(String[] args)(Code)(Java Doc) public int run(String[] args, PrintWriter log)(Code)(Java Doc) public int runTests(TestParams params, String[] tests)(Code)(Java Doc) protected TimeZone safeGetTimeZone(String id)(Code)(Java Doc) public void usage()(Code)(Java Doc) public static void usage(PrintWriter pw, String className)(Code)(Java Doc) protected boolean validate()(Code)(Java Doc) protected boolean validateMethod(String name)(Code)(Java Doc)
|
|
|