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