tkormann 02/03/19 07:39:46 Modified: samples/tests/spec/scripting remove.svg test-resources/org/apache/batik/test regard.xml Added: test-resources/org/apache/batik/css/engine/value unitTesting.xml test-sources/org/apache/batik/css/engine/value PropertyManagerTest.java Log: add CSS tests to regard. Those tests check all CSS properties with all ident possible values, if the property is inherited or not and what the initial value is. Revision Changes Path 1.3 +2 -3 xml-batik/samples/tests/spec/scripting/remove.svg Index: remove.svg =================================================================== RCS file: /home/cvs/xml-batik/samples/tests/spec/scripting/remove.svg,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- remove.svg 7 Mar 2002 09:02:56 -0000 1.2 +++ remove.svg 19 Mar 2002 15:39:46 -0000 1.3 @@ -14,7 +14,7 @@ <!-- append child test --> <!-- --> <!-- @author [EMAIL PROTECTED] --> -<!-- @version $Id: remove.svg,v 1.2 2002/03/07 09:02:56 tkormann Exp $ --> +<!-- @version $Id: remove.svg,v 1.3 2002/03/19 15:39:46 tkormann Exp $ --> <!-- ====================================================================== --> <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> @@ -41,8 +41,7 @@ function removeAll(evt) { var g = evt.target; -// while (g.hasChildNodes) { - while (g.firstChild != null) { + while (g.hasChildNodes()) { g.removeChild(g.firstChild); } } 1.1 xml-batik/test-resources/org/apache/batik/css/engine/value/unitTesting.xml Index: unitTesting.xml =================================================================== <!-- ====================================================================== --> <!-- 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. --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: unitTesting.xml,v 1.1 2002/03/19 15:39:46 tkormann Exp $ --> <!-- ====================================================================== --> <testSuite id="css.engine.value.unitTesting" name="org.apache.batik.css.engine.value.ValueManager Unit Testing"> <testGroup id="css.engine.values" class="org.apache.batik.css.engine.value.PropertyManagerTest"> <!-- ############################################################################## --> <test id="css.engine.value.svg.alignement-baseline"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.AlignmentBaselineManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="auto" /> <arg class="java.lang.String" value="auto | baseline | before-edge | text-before-edge | middle | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.baseline-shift"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.BaselineShiftManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="baseline" /> <arg class="java.lang.String" value="baseline | sub | super" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.clip"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.ClipManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="auto" /> <arg class="java.lang.String" value="auto" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.clip-path"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.ClipPathManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="none" /> <arg class="java.lang.String" value="none" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.clip-rule"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.ClipRuleManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="nonzero" /> <arg class="java.lang.String" value="nonzero | evenodd" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.color"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.ColorManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="__USER_AGENT__" /> <arg class="java.lang.String" value="" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.color-interpolation"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.ColorInterpolationManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="sRGB" /> <arg class="java.lang.String" value="auto | sRGB | linearRGB" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.color-interpolation-filters"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.ColorInterpolationFiltersManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="linearRGB" /> <arg class="java.lang.String" value="auto | sRGB | linearRGB" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.color-profile"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.ColorProfileManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="auto" /> <arg class="java.lang.String" value="auto | sRGB" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.color-rendering"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.ColorRenderingManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="auto" /> <arg class="java.lang.String" value="auto | optimizeSpeed | optimizeQuality" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.cursor"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.CursorManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="auto" /> <arg class="java.lang.String" value="auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize| text | wait | help " /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.direction"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.DirectionManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="ltr" /> <arg class="java.lang.String" value="ltr | rtl" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.display"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.DisplayManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="inline" /> <arg class="java.lang.String" value="inline | block | list-item | run-in | compact | marker | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | none" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.dominant-baseline"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.DominantBaselineManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="auto" /> <arg class="java.lang.String" value="auto | use-script | no-change | reset-size | alphabetic | hanging | ideographic | mathematical | central | middle | text-after-edge | text-before-edge | text-top | text-bottom" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.enable-background"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.EnableBackgroundManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="accumulate" /> <arg class="java.lang.String" value="accumulate" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.fill"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$FillManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="rgb(0, 0, 0)" /> <arg class="java.lang.String" value="" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.fill-opacity"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$FillOpacityManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="1" /> <arg class="java.lang.String" value="" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.fill-rule"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.FillRuleManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="nonzero" /> <arg class="java.lang.String" value="nonzero | evenodd" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.filter"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.FilterManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="none" /> <arg class="java.lang.String" value="none" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.flood-color"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$FloodColorManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="rgb(0, 0, 0)" /> <arg class="java.lang.String" value="currentColor" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.flood-opacity"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$FloodOpacityManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="1" /> <arg class="java.lang.String" value="" /> </test> <!-- ############################################################################## --> <!-- *** IGNORE *** <test id="css.engine.value.css2.font"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.FontManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="1" /> <arg class="java.lang.String" value="" /> </test> --> <!-- ############################################################################## --> <test id="css.engine.value.css2.font-family"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.FontFamilyManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="__USER_AGENT__" /> <arg class="java.lang.String" value="" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.font-size"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.FontSizeManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="medium" /> <arg class="java.lang.String" value="medium" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.font-size-adjust"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.FontSizeAdjustManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="none" /> <arg class="java.lang.String" value="none" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.font-stretch"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.FontStretchManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="normal" /> <arg class="java.lang.String" value="normal | wider | narrower | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.font-style"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.FontStyleManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="normal" /> <arg class="java.lang.String" value="normal | italic | oblique" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.font-variant"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.FontVariantManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="normal" /> <arg class="java.lang.String" value="normal | small-caps" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.font-weigth"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.FontWeightManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="normal" /> <arg class="java.lang.String" value="normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.glyph-orientation-horizontal"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.GlyphOrientationHorizontalManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="0deg" /> <arg class="java.lang.String" value="" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.glyph-orientation-vertical"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.GlyphOrientationVerticalManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="auto" /> <arg class="java.lang.String" value="auto" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.image-rendering"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.ImageRenderingManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="auto" /> <arg class="java.lang.String" value="auto | optimizeSpeed | optimizeQuality" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.kerning"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.KerningManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="auto" /> <arg class="java.lang.String" value="auto" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.letter-spacing"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$LetterSpacingManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="normal" /> <arg class="java.lang.String" value="normal" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.lighting-color"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$LightingColorManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="rgb(255, 255, 255)" /> <arg class="java.lang.String" value="currentColor" /> </test> <!-- ############################################################################## --> <!-- *** IGNORE *** <test id="css.engine.value.svg.marker"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.MarkerManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="" /> <arg class="java.lang.String" value="" /> </test> --> <!-- ############################################################################## --> <test id="css.engine.value.svg.marker-start"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$MarkerStartManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="none" /> <arg class="java.lang.String" value="none" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.marker-mid"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$MarkerMidManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="none" /> <arg class="java.lang.String" value="none" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.marker-end"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$MarkerEndManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="none" /> <arg class="java.lang.String" value="none" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.mask"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.MaskManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="none" /> <arg class="java.lang.String" value="none" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.opacity"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$DefaultOpacityManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="1" /> <arg class="java.lang.String" value="" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.overflow"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.OverflowManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="visible" /> <arg class="java.lang.String" value="visible | hidden | scroll | auto" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.pointer-events'"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.PointerEventsManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="visiblePainted" /> <arg class="java.lang.String" value="visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | none" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.shape-rendering'"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.ShapeRenderingManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="auto" /> <arg class="java.lang.String" value="auto | optimizeSpeed | crispEdges | geometricPrecision" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.stop-color'"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$StopColorManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="rgb(0, 0, 0)" /> <arg class="java.lang.String" value="" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.stop-opacity'"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$StopOpacityManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="1" /> <arg class="java.lang.String" value="" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.stroke"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$StrokeManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="none" /> <arg class="java.lang.String" value="none" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.stroke-dasharray"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.StrokeDasharrayManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="none" /> <arg class="java.lang.String" value="none" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.stroke-dashoffset"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.StrokeDashoffsetManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="0" /> <arg class="java.lang.String" value="0" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.stroke-linecap"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.StrokeLinecapManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="butt" /> <arg class="java.lang.String" value="butt | round | square" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.stroke-linejoin"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.StrokeLinejoinManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="miter" /> <arg class="java.lang.String" value="miter | round | bevel" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.stroke-miterlimit"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.StrokeMiterlimitManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="4" /> <arg class="java.lang.String" value="" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.stroke-opacity"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$StrokeOpacityManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="1" /> <arg class="java.lang.String" value="" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.stroke-width"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.StrokeWidthManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="1" /> <arg class="java.lang.String" value="" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.text-anchor"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.TextAnchorManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="start" /> <arg class="java.lang.String" value="start | middle | end" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.text-decoration"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.TextDecorationManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="none" /> <arg class="java.lang.String" value="none | underline | overline | line-through | blink" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.text-rendering"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.TextRenderingManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="auto" /> <arg class="java.lang.String" value="auto | optimizeSpeed | optimizeLegibility | geometricPrecision" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.svg.unicode-bidi"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.UnicodeBidiManager" /> <arg class="java.lang.Boolean" value="false" /> <arg class="java.lang.String" value="normal" /> <arg class="java.lang.String" value="normal | embed | bidi-override" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.visibility"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.css2.VisibilityManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="visible" /> <arg class="java.lang.String" value="visible | hidden | collapse" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.word-spacing"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.PropertyManagerTest$WordSpacingManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="normal" /> <arg class="java.lang.String" value="normal" /> </test> <!-- ############################################################################## --> <test id="css.engine.value.css2.writing-mode"> <arg class="java.lang.String" value="org.apache.batik.css.engine.value.svg.WritingModeManager" /> <arg class="java.lang.Boolean" value="true" /> <arg class="java.lang.String" value="lr-tb" /> <arg class="java.lang.String" value="lr-tb | rl-tb | tb-rl | lr | rl | tb" /> </test> </testGroup> </testSuite> 1.22 +3 -3 xml-batik/test-resources/org/apache/batik/test/regard.xml Index: regard.xml =================================================================== RCS file: /home/cvs/xml-batik/test-resources/org/apache/batik/test/regard.xml,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- regard.xml 7 Mar 2002 10:47:49 -0000 1.21 +++ regard.xml 19 Mar 2002 15:39:46 -0000 1.22 @@ -11,7 +11,7 @@ <!-- regression testing. --> <!-- --> <!-- @author [EMAIL PROTECTED] --> -<!-- @version $Id: regard.xml,v 1.21 2002/03/07 10:47:49 tkormann Exp $ --> +<!-- @version $Id: regard.xml,v 1.22 2002/03/19 15:39:46 tkormann Exp $ --> <!-- ========================================================================= --> <testRun id="regard" name="Batik Standard Regression Test Run"> <testReportProcessor class="org.apache.batik.test.xml.XMLTestReportProcessor" > @@ -58,8 +58,8 @@ <testSuite href="file:test-resources/org/apache/batik/gvt/unitTesting.xml" /> <testSuite href="file:test-resources/org/apache/batik/parser/unitTesting.xml" /> <testSuite href="file:test-resources/org/apache/batik/transcoder/image/unitTesting.xml" /> -<!-- + <testSuite href="file:test-resources/org/apache/batik/css/engine/value/unitTesting.xml" /> ---> + </testRun> 1.1 xml-batik/test-sources/org/apache/batik/css/engine/value/PropertyManagerTest.java Index: PropertyManagerTest.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.css.engine.value; import java.io.PrintWriter; import java.io.StringWriter; import java.util.StringTokenizer; import org.apache.batik.test.AbstractTest; import org.apache.batik.test.DefaultTestReport; import org.apache.batik.test.TestReport; import org.apache.batik.css.parser.Parser; import org.w3c.css.sac.LexicalUnit; import org.apache.batik.css.engine.value.css2.*; import org.apache.batik.css.engine.value.svg.*; import org.apache.batik.util.CSSConstants; import org.w3c.dom.css.CSSPrimitiveValue; /** * The class to test the CSS properties's manager. * * @author <a href="mailto:[EMAIL PROTECTED]">Thierry Kormann</a> * @version $Id: PropertyManagerTest.java,v 1.1 2002/03/19 15:39:46 tkormann Exp $ */ public class PropertyManagerTest extends AbstractTest { /** * The error code for the 'is inherited' test. */ public static final String ERROR_IS_INHERITED = "PropertyManagerTest.error.inherited"; /** * The error code if the property does not support the 'inherit' value. */ public static final String ERROR_INHERIT_VALUE = "PropertyManagerTest.error.inherit.value"; /** * The error code for the 'default value' test. */ public static final String ERROR_INVALID_DEFAULT_VALUE = "PropertyManagerTest.error.invalid.default.value"; /** * The error code for an invalid property value. */ public static final String ERROR_INVALID_VALUE = "PropertyManagerTest.error.invalid.value"; /** * The error code if an exception occured while creating the manager. */ public static final String ERROR_INSTANTIATION = "PropertyManagerTest.error.instantiation"; /** * The class of the manager. */ protected String managerClassName; /** * This flag bit indicates whether or not the property is inherited. */ protected Boolean isInherited; /** * The candidate values of the property. */ protected String [] identValues; /** * The candidate default value of the property. */ protected String defaultValue; /** * Constructs a new test for the specified manager classname. * * @param managerClassName the classname of the manager to test * @param isInherited the expected flag to see if the property is inherited * @param defaultValue the default value * @param identValueList the list of possible identifiers */ public PropertyManagerTest(String managerClassName, Boolean isInherited, String defaultValue, String identValueList) { this.managerClassName = managerClassName; this.isInherited = isInherited; this.defaultValue = defaultValue; StringTokenizer tokens = new StringTokenizer(identValueList, "|"); int nbIdentValue = tokens.countTokens(); if (nbIdentValue > 0) { identValues = new String[nbIdentValue]; for (int i=0; tokens.hasMoreTokens(); ++i) { identValues[i] = tokens.nextToken().trim(); } } } /** * Creates the value manager. */ protected ValueManager createValueManager() throws Exception { return (ValueManager)Class.forName(managerClassName).newInstance(); } /** * Runs this test. This method will only throw exceptions if some aspect of * the test's internal operation fails. */ public TestReport runImpl() throws Exception { DefaultTestReport report = new DefaultTestReport(this); ValueManager manager; try { manager = createValueManager(); } catch (Exception ex) { report.setErrorCode(ERROR_INSTANTIATION); report.setPassed(false); report.addDescriptionEntry(ERROR_INSTANTIATION, ex.getMessage()); return report; } // test default value if any if (!defaultValue.equals("__USER_AGENT__")) { String s = manager.getDefaultValue().getCssText(); if (!defaultValue.equalsIgnoreCase(s)) { report.setErrorCode(ERROR_INVALID_DEFAULT_VALUE); report.setPassed(false); report.addDescriptionEntry(ERROR_INVALID_DEFAULT_VALUE, "should be: "+defaultValue); } } // test if the property is inherited or not if (isInherited.booleanValue() != manager.isInheritedProperty()) { report.setErrorCode(ERROR_IS_INHERITED); report.setPassed(false); report.addDescriptionEntry(ERROR_IS_INHERITED, ""); } Parser cssParser = new Parser(); // see if the property supports the value 'inherit' try { LexicalUnit lu = cssParser.parsePropertyValue("inherit"); Value v = manager.createValue(lu, null); String s = v.getCssText(); if (!"inherit".equalsIgnoreCase(s)) { report.setErrorCode(ERROR_INHERIT_VALUE); report.setPassed(false); report.addDescriptionEntry(ERROR_INHERIT_VALUE, "inherit"); } } catch (Exception ex) { report.setErrorCode(ERROR_INHERIT_VALUE); report.setPassed(false); report.addDescriptionEntry(ERROR_INHERIT_VALUE, ex.getMessage()); } // test all possible identifiers if (identValues != null) { try { for (int i=0; i < identValues.length; ++i) { LexicalUnit lu = cssParser.parsePropertyValue(identValues[i]); Value v = manager.createValue(lu, null); String s = v.getCssText(); if (!identValues[i].equalsIgnoreCase(s)) { report.setErrorCode(ERROR_INVALID_VALUE); report.setPassed(false); report.addDescriptionEntry(ERROR_INVALID_VALUE, identValues[i]+"/"+s); } } } catch (Exception ex) { report.setErrorCode(ERROR_INVALID_VALUE); report.setPassed(false); report.addDescriptionEntry(ERROR_INVALID_VALUE, ex.getMessage()); } } return report; } /** * Manager for 'fill'. */ public static class FillManager extends SVGPaintManager { public FillManager() { super(CSSConstants.CSS_FILL_PROPERTY); } } /** * Manager for 'fill-opacity'. */ public static class FillOpacityManager extends OpacityManager { public FillOpacityManager() { super(CSSConstants.CSS_FILL_OPACITY_PROPERTY, true); } } /** * Manager for 'flood-color'. */ public static class FloodColorManager extends SVGColorManager { public FloodColorManager() { super(CSSConstants.CSS_FLOOD_COLOR_PROPERTY); } } /** * Manager for 'flood-opacity'. */ public static class FloodOpacityManager extends OpacityManager { public FloodOpacityManager() { super(CSSConstants.CSS_FLOOD_OPACITY_PROPERTY, false); } } /** * Manager for 'letter-spacing'. */ public static class LetterSpacingManager extends SpacingManager { public LetterSpacingManager() { super(CSSConstants.CSS_LETTER_SPACING_PROPERTY); } } /** * Manager for 'lighting-color'. */ public static class LightingColorManager extends SVGColorManager { public LightingColorManager() { super(CSSConstants.CSS_LIGHTING_COLOR_PROPERTY, ValueConstants.WHITE_RGB_VALUE); } } /** * Manager for 'marker-end'. */ public static class MarkerEndManager extends MarkerManager { public MarkerEndManager() { super(CSSConstants.CSS_MARKER_END_PROPERTY); } } /** * Manager for 'marker-mid'. */ public static class MarkerMidManager extends MarkerManager { public MarkerMidManager() { super(CSSConstants.CSS_MARKER_MID_PROPERTY); } } /** * Manager for 'marker-start'. */ public static class MarkerStartManager extends MarkerManager { public MarkerStartManager() { super(CSSConstants.CSS_MARKER_START_PROPERTY); } } /** * Manager for 'opacity'. */ public static class DefaultOpacityManager extends OpacityManager { public DefaultOpacityManager() { super(CSSConstants.CSS_OPACITY_PROPERTY, false); } } /** * Manager for 'stop-color'. */ public static class StopColorManager extends SVGColorManager { public StopColorManager() { super(CSSConstants.CSS_STOP_COLOR_PROPERTY); } } /** * Manager for 'stop-opacity'. */ public static class StopOpacityManager extends OpacityManager { public StopOpacityManager() { super(CSSConstants.CSS_STOP_OPACITY_PROPERTY, false); } } /** * Manager for 'stroke'. */ public static class StrokeManager extends SVGPaintManager { public StrokeManager() { super(CSSConstants.CSS_STROKE_PROPERTY, ValueConstants.NONE_VALUE); } } /** * Manager for 'stroke-opacity'. */ public static class StrokeOpacityManager extends OpacityManager { public StrokeOpacityManager() { super(CSSConstants.CSS_STROKE_OPACITY_PROPERTY, true); } } /** * Manager for 'word-spacing'. */ public static class WordSpacingManager extends SpacingManager { public WordSpacingManager() { super(CSSConstants.CSS_WORD_SPACING_PROPERTY); } } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]