Clarify parse test messages

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@811897 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-09-06 21:26:18 +00:00
parent 5a63bb398c
commit 8961047173
1 changed files with 6 additions and 3 deletions

View File

@ -366,19 +366,22 @@ public abstract class RealVectorFormatAbstractTest extends TestCase {
public void testForgottenPrefix() {
ParsePosition pos = new ParsePosition(0);
assertNull(new RealVectorFormat().parse("1; 1; 1}", pos));
final String source = "1; 1; 1}";
assertNull("Should not parse <"+source+">",new RealVectorFormat().parse(source, pos));
assertEquals(0, pos.getErrorIndex());
}
public void testForgottenSeparator() {
ParsePosition pos = new ParsePosition(0);
assertNull(new RealVectorFormat().parse("{1; 1 1}", pos));
final String source = "{1; 1 1}";
assertNull("Should not parse <"+source+">",new RealVectorFormat().parse(source, pos));
assertEquals(6, pos.getErrorIndex());
}
public void testForgottenSuffix() {
ParsePosition pos = new ParsePosition(0);
assertNull(new RealVectorFormat().parse("{1; 1; 1 ", pos));
final String source = "{1; 1; 1 ";
assertNull("Should not parse <"+source+">",new RealVectorFormat().parse(source, pos));
assertEquals(8, pos.getErrorIndex());
}