334335336337338339340341342343
// success } } public void testFormatNumber() { CompositeFormat cf = ComplexFormat.getInstance(getLocale()); Double pi = Double.valueOf(Math.PI); String text = cf.format(pi); assertEquals("3" + getDecimalCharacter() + "14", text); }
342343344345346347348349350351352353354
assertEquals("3" + getDecimalCharacter() + "14", text); } public void testFormatObject() { try { CompositeFormat cf = new ComplexFormat(); Object object = new Object(); cf.format(object); fail(); } catch (IllegalArgumentException ex) { // success } }
353354355356357358359360361362363364365
assertEquals(nf, cf.getFormat()); } public void testFormatObject() { try { CompositeFormat cf = new RealVectorFormat(); Object object = new Object(); cf.format(object); fail(); } catch (IllegalArgumentException ex) { // success } }
352353354355356357358359360361362363364
335336337338339340341342343344
// success } } public void testFormatNumber() { CompositeFormat cf = ComplexFormat.getInstance(getLocale()); Double pi = Double.valueOf(FastMath.PI); String text = cf.format(pi); assertEquals("3" + getDecimalCharacter() + "14", text); }
343344345346347348349350351352353354355
329330331332333334335336337338339340341
assertEquals(nf, cf.getFormat()); } public void testFormatObject() { try { CompositeFormat cf = new Vector3DFormat(); Object object = new Object(); cf.format(object); fail(); } catch (IllegalArgumentException ex) { // success } }