< prev index next >

test/java/text/Format/NumberFormat/BigDecimalFormat.java

Print this page

        

*** 791,801 **** // ------------- // 300 zeros formatted.setLength(0); from = "123456789"; to = sep_zero.substring(0, 399) + ",123,456,789"; ! nf.format(new Long(from), formatted, new FieldPosition(0)); checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); /* ------------------------------------------------------------------ */ ((DecimalFormat)nf).applyPattern("##0.###"); --- 791,801 ---- // ------------- // 300 zeros formatted.setLength(0); from = "123456789"; to = sep_zero.substring(0, 399) + ",123,456,789"; ! nf.format(123456789L, formatted, new FieldPosition(0)); checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); /* ------------------------------------------------------------------ */ ((DecimalFormat)nf).applyPattern("##0.###");
*** 808,818 **** // 300 zeros formatted.setLength(0); from = "123456789"; to = "-" + nonsep_zero.substring(0, 300) + "123456789." + nonsep_zero.substring(0, 340); ! nf.format(new Long(from), formatted, new FieldPosition(0)); checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); /* ------------------------------------------------------------------ */ ((DecimalFormat)nf).applyPattern("#,##0.###"); --- 808,818 ---- // 300 zeros formatted.setLength(0); from = "123456789"; to = "-" + nonsep_zero.substring(0, 300) + "123456789." + nonsep_zero.substring(0, 340); ! nf.format(123456789L, formatted, new FieldPosition(0)); checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); /* ------------------------------------------------------------------ */ ((DecimalFormat)nf).applyPattern("#,##0.###");
*** 825,835 **** // 280 zeros formatted.setLength(0); from = Long.toString(Long.MAX_VALUE); to = sep_zero.substring(0, 373) + "19,807,040,619,342,712,359,383,728,129"; ! nf.format(new Long(from), formatted, new FieldPosition(0)); checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); /* ------------------------------------------------------------------ */ ((DecimalFormat)nf).applyPattern("0.###E0"); --- 825,835 ---- // 280 zeros formatted.setLength(0); from = Long.toString(Long.MAX_VALUE); to = sep_zero.substring(0, 373) + "19,807,040,619,342,712,359,383,728,129"; ! nf.format(Long.MAX_VALUE, formatted, new FieldPosition(0)); checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); /* ------------------------------------------------------------------ */ ((DecimalFormat)nf).applyPattern("0.###E0");
*** 842,852 **** // 312 zeros formatted.setLength(0); from = Long.toString(Long.MAX_VALUE); to = "-1.9807040628566084396238503936" + nonsep_zero.substring(0, 312) + "E28"; ! nf.format(new Long(from), formatted, new FieldPosition(0)); checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); /* ------------------------------------------------------------------ */ ((DecimalFormat)nf).applyPattern("##0.###E0"); --- 842,852 ---- // 312 zeros formatted.setLength(0); from = Long.toString(Long.MAX_VALUE); to = "-1.9807040628566084396238503936" + nonsep_zero.substring(0, 312) + "E28"; ! nf.format(Long.MAX_VALUE, formatted, new FieldPosition(0)); checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); /* ------------------------------------------------------------------ */ ((DecimalFormat)nf).applyPattern("##0.###E0");
*** 860,870 **** formatted.setLength(0); from = Long.toString(Long.MIN_VALUE); to = "-19807040619342712361531211776" + nonsep_zero.substring(0, 280) + "." + nonsep_zero.substring(0, 340) + "E-280"; ! nf.format(new Long(from), formatted, new FieldPosition(0)); checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); /* ------------------------------------------------------------------ */ ((DecimalFormat)nf).applyPattern("#,##0.###"); --- 860,870 ---- formatted.setLength(0); from = Long.toString(Long.MIN_VALUE); to = "-19807040619342712361531211776" + nonsep_zero.substring(0, 280) + "." + nonsep_zero.substring(0, 340) + "E-280"; ! nf.format(Long.MIN_VALUE, formatted, new FieldPosition(0)); checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); /* ------------------------------------------------------------------ */ ((DecimalFormat)nf).applyPattern("#,##0.###");
*** 878,888 **** formatted.setLength(0); from = Long.toString(Long.MIN_VALUE); to = sep_zero.substring(0, 373) + "19,807,040,628,566,084,398,385,987,584." + nonsep_zero.substring(0, 340); ! nf.format(new Long(from), formatted, new FieldPosition(0)); checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); } /** * Test for special numbers --- 878,888 ---- formatted.setLength(0); from = Long.toString(Long.MIN_VALUE); to = sep_zero.substring(0, 373) + "19,807,040,628,566,084,398,385,987,584." + nonsep_zero.substring(0, 340); ! nf.format(Long.MIN_VALUE, formatted, new FieldPosition(0)); checkFormat(from, formatted, to, ((DecimalFormat)nf).getMultiplier()); } /** * Test for special numbers
< prev index next >