vhardy 01/10/19 04:26:01 Modified: test-sources/org/apache/batik/test/svg PreconfiguredRenderingTest.java Added: test-sources/org/apache/batik/test AssertEqualsException.java AssertException.java AssertNullException.java AssertTrueException.java Log: Added new test exception classes. Revision Changes Path 1.1 xml-batik/test-sources/org/apache/batik/test/AssertEqualsException.java Index: AssertEqualsException.java =================================================================== /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * version 1.1, a copy of which has been included with this distribution in * * the LICENSE file. * *****************************************************************************/ package org.apache.batik.test; /** * Exception which Tests can throw when a specific <tt>assertEquals</tt> fails. * * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Hardy</a> * @version $Id: AssertEqualsException.java,v 1.1 2001/10/19 11:26:01 vhardy Exp $ */ public class AssertEqualsException extends AssertException { public static final String ENTRY_KEY_REF_OBJECT = "AssertEqualsException.entry.key.ref.object"; public static final String ENTRY_KEY_CMP_OBJECT = "AssertEqualsException.entry.key.cmp.object"; public static final String ASSERTION_TYPE = "assertEquals"; /** * Objects which should have be equal */ protected Object ref, cmp; public AssertEqualsException(Object ref, Object cmp){ this.ref = ref; this.cmp = cmp; } /** * Requests that the exception populates the TestReport with the * relevant information. */ public void addDescription(TestReport report){ report.addDescriptionEntry(ENTRY_KEY_REF_OBJECT, ref); report.addDescriptionEntry(ENTRY_KEY_CMP_OBJECT, cmp); } public String getAssertionType(){ return ASSERTION_TYPE; } } 1.1 xml-batik/test-sources/org/apache/batik/test/AssertException.java Index: AssertException.java =================================================================== /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * version 1.1, a copy of which has been included with this distribution in * * the LICENSE file. * *****************************************************************************/ package org.apache.batik.test; /** * Exception which Tests can throw when a specific assertion fails. * * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Hardy</a> * @version $Id: AssertException.java,v 1.1 2001/10/19 11:26:01 vhardy Exp $ */ public abstract class AssertException extends TestErrorConditionException { public static final String ENTRY_KEY_ASSERTION_TYPE = "AssertException.entry.key.assertion.type"; /** * <tt>TestErrorConditionException</tt> implementation. */ public TestReport getTestReport(Test test){ DefaultTestReport report = new DefaultTestReport(test); report.setErrorCode(report.ERROR_ASSERTION_FAILED); report.addDescriptionEntry(ENTRY_KEY_ASSERTION_TYPE, getAssertionType()); addDescription(report); addStackTraceDescription(report); return report; } /** * Requests that the exception populates the TestReport with the * relevant information. */ public abstract void addDescription(TestReport report); /** * Returns the type of assertion which failed. e.g., "assertEquals" */ public abstract String getAssertionType(); } 1.1 xml-batik/test-sources/org/apache/batik/test/AssertNullException.java Index: AssertNullException.java =================================================================== /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * version 1.1, a copy of which has been included with this distribution in * * the LICENSE file. * *****************************************************************************/ package org.apache.batik.test; /** * Exception which Tests can throw when a specific <tt>assertNull</tt> fails. * * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Hardy</a> * @version $Id: AssertNullException.java,v 1.1 2001/10/19 11:26:01 vhardy Exp $ */ public class AssertNullException extends AssertException { public static final String ASSERTION_TYPE = "assertNull"; /** * Objects which should have be equal */ protected Object ref, cmp; public AssertNullException(){ } /** * Requests that the exception populates the TestReport with the * relevant information. */ public void addDescription(TestReport report){ } public String getAssertionType(){ return ASSERTION_TYPE; } } 1.1 xml-batik/test-sources/org/apache/batik/test/AssertTrueException.java Index: AssertTrueException.java =================================================================== /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * version 1.1, a copy of which has been included with this distribution in * * the LICENSE file. * *****************************************************************************/ package org.apache.batik.test; /** * Exception which Tests can throw when a specific <tt>assertTrue</tt> fails. * * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Hardy</a> * @version $Id: AssertTrueException.java,v 1.1 2001/10/19 11:26:01 vhardy Exp $ */ public class AssertTrueException extends AssertException { public static final String ASSERTION_TYPE = "assertTrue"; /** * Objects which should have be equal */ protected Object ref, cmp; public AssertTrueException(){ } /** * Requests that the exception populates the TestReport with the * relevant information. */ public void addDescription(TestReport report){ } public String getAssertionType(){ return ASSERTION_TYPE; } } 1.2 +10 -1 xml-batik/test-sources/org/apache/batik/test/svg/PreconfiguredRenderingTest.java Index: PreconfiguredRenderingTest.java =================================================================== RCS file: /home/cvs/xml-batik/test-sources/org/apache/batik/test/svg/PreconfiguredRenderingTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- PreconfiguredRenderingTest.java 2001/10/16 10:38:10 1.1 +++ PreconfiguredRenderingTest.java 2001/10/19 11:26:01 1.2 @@ -15,7 +15,7 @@ * rules for the various configuration parameters. * * @author <a href="[EMAIL PROTECTED]">Vincent Hardy</a> - * @version $Id: PreconfiguredRenderingTest.java,v 1.1 2001/10/16 10:38:10 vhardy Exp $ + * @version $Id: PreconfiguredRenderingTest.java,v 1.2 2001/10/19 11:26:01 vhardy Exp $ */ public abstract class PreconfiguredRenderingTest extends SVGRenderingAccuracyTest { /** @@ -44,6 +44,15 @@ setVariationURL(buildVariationURL(dirNfile[0], dirNfile[1])); setSaveVariation(new File(buildSaveVariationFile(dirNfile[0], dirNfile[1]))); + } + + /** + * Make the name as simple as possible. For preconfigured SVG files, + * we use the test id, which is the relevant identifier for the test + * user. + */ + public String getName(){ + return getId(); } /**
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]