1 18 package org.apache.batik.parser; 19 20 import java.io.*; 21 22 import org.apache.batik.test.*; 23 24 30 public class LengthParserFailureTest extends AbstractTest { 31 32 protected String sourceLength; 33 34 38 public LengthParserFailureTest(String slength) { 39 sourceLength = slength; 40 } 41 42 public TestReport runImpl() throws Exception { 43 LengthParser pp = new LengthParser(); 44 try { 45 pp.parse(new StringReader(sourceLength)); 46 } catch (ParseException e) { 47 return reportSuccess(); 48 } 49 DefaultTestReport report = new DefaultTestReport(this); 50 report.setErrorCode("parse.without.error"); 51 report.addDescriptionEntry("input.text", sourceLength); 52 report.setPassed(false); 53 return report; 54 } 55 } 56 | Popular Tags |