assertEquals(parser.getChar(), ',');
}
@Test public void testReadNumber() throws ParseException {
SVGPointsParser p = (SVGPointsParser)parser;
p.setCode("10"); //$NON-NLS-1$
assertEquals(p.readNumber(), 10., 0.0001);
p.setCode("+10"); //$NON-NLS-1$
assertEquals(p.readNumber(), 10., 0.0001);
p.setCode("-10"); //$NON-NLS-1$
assertEquals(p.readNumber(), -10., 0.0001);
p.setCode("-10."); //$NON-NLS-1$
assertEquals(p.readNumber(), -10., 0.0001);
p.setCode("-.1"); //$NON-NLS-1$
assertEquals(p.readNumber(), -.1, 0.0001);
p.setCode("10e2"); //$NON-NLS-1$
assertEquals(p.readNumber(), 1000., 0.0001);
p.setCode("10e-2"); //$NON-NLS-1$
assertEquals(p.readNumber(), 0.1, 0.0001);
p.setCode("10e+2"); //$NON-NLS-1$
assertEquals(p.readNumber(), 1000., 0.0001);
p.setCode("10E2"); //$NON-NLS-1$
assertEquals(p.readNumber(), 1000., 0.0001);
p.setCode("10E-2"); //$NON-NLS-1$
assertEquals(p.readNumber(), 0.1, 0.0001);
p.setCode("10E+2"); //$NON-NLS-1$
assertEquals(p.readNumber(), 1000., 0.0001);
p.setCode("0.E+2"); //$NON-NLS-1$
assertEquals(p.readNumber(), 0., 0.0001);
try {
p.setCode(".E+2"); //$NON-NLS-1$
assertEquals(p.readNumber(), 0., 0.0001);
} catch(ParseException e) { /* */}
try {
p.setCode(".Efd+2"); //$NON-NLS-1$
assertEquals(p.readNumber(), 0., 0.0001);
} catch(ParseException e) { /* */}
try {
p.setCode(""); //$NON-NLS-1$
assertEquals(p.readNumber(), 0., 0.0001);
} catch(ParseException e) { /* */}
try {
p.setCode(" \t"); //$NON-NLS-1$
assertEquals(p.readNumber(), 0., 0.0001);
} catch(ParseException e) { /* */}
try {
p.setCode("aa"); //$NON-NLS-1$
assertEquals(p.readNumber(), 0., 0.0001);
} catch(ParseException e) { /* */}
try {
p.setCode("."); //$NON-NLS-1$
assertEquals(p.readNumber(), 0., 0.0001);
} catch(ParseException e) { /* */}
try {
p.setCode("--10"); //$NON-NLS-1$
assertEquals(p.readNumber(), 0., 0.0001);
} catch(ParseException e) { /* */}
try {
p.setCode("+-10"); //$NON-NLS-1$
assertEquals(p.readNumber(), 0., 0.0001);
} catch(ParseException e) { /* */}
}