if (_maxInt > _minInt && _minInt > 1) {
_minInt = 1;
}
- minInt = _minInt < 0 ? 0 : _minInt >= 8 ? 1 : _minInt;
- maxInt = _maxInt < _minInt ? _minInt : _maxInt >= 8 ? _minInt : _maxInt;
- assert 0 <= minInt && minInt <= maxInt && maxInt < 8;
+ maxInt = _maxInt > 8 ? 8 : _maxInt < _minInt ? _minInt : _maxInt;
+ minInt = _minInt < 0 ? 0 : _minInt > maxInt ? maxInt : _minInt;
+ assert 0 <= minInt && minInt <= maxInt && maxInt <= 8;
interval = maxInt < 1 ? 1 : maxInt;
this.rounder = rounder;
assertEquals("Should ignore scientific minInt if maxInt>minInt", "1.23E-3", result);
}
+ @Test
+ public void Test13310() {
+ assertEquals("Should not throw an assertion error",
+ "10000000.76E0",
+ new DecimalFormat("000000000.0#E0").format(10000000.76d));
+ }
+
@Test
public void testPercentZero() {
DecimalFormat df = (DecimalFormat) NumberFormat.getPercentInstance();