CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/11/09 21:36:05
Modified files: testsuite/misc-ming.all: DrawingApiTest.as . : ChangeLog Log message: add test that would have exposed the just-fixed silly bug. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DrawingApiTest.as?cvsroot=gnash&r1=1.26&r2=1.27 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4819&r2=1.4820 Patches: Index: testsuite/misc-ming.all/DrawingApiTest.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/DrawingApiTest.as,v retrieving revision 1.26 retrieving revision 1.27 diff -u -b -r1.26 -r1.27 --- testsuite/misc-ming.all/DrawingApiTest.as 8 Nov 2007 20:01:57 -0000 1.26 +++ testsuite/misc-ming.all/DrawingApiTest.as 9 Nov 2007 21:36:05 -0000 1.27 @@ -17,7 +17,7 @@ // 'h' toggles _visible // -rcsid="$Id: DrawingApiTest.as,v 1.26 2007/11/08 20:01:57 strk Exp $"; +rcsid="$Id: DrawingApiTest.as,v 1.27 2007/11/09 21:36:05 strk Exp $"; #include "../actionscript.all/check.as" @@ -195,6 +195,37 @@ bnd = printBounds(a.getBounds()); check_equals(bnd, "18,80 410,260"); // nothing new.. + + createEmptyMovieClip("zshape", 1); + with (zshape) + { + // The Z-shaped 3 edges stroke + // + // + // 0-----1--+ + // | + // 2 + // | + // | + // +--3----4 + // + lineStyle(4, 0); + x = 223; y=145; + moveTo(x, y); + lineTo(x+20, y+0); + lineTo(x+20, y+20); + lineTo(x+50, y+20); + } + bnd = printBounds(zshape.getBounds()); + check_equals(bnd, "219,141 277,169"); + // "223,145 273,165" + 4 for thickness + check_equals( typeof(zshape.hitTest), 'function' ); + check( zshape.hitTest(223, 145, true) ); // 0 + check( zshape.hitTest((223+10), (145+0), true) ); // 1 + check( zshape.hitTest((223+20), (145+5), true) ); // 2 + check( zshape.hitTest((223+25), (145+20), true) ); // 3 + check( zshape.hitTest(273, 165, true) ); // 4 + } // Make the MovieClip "active" (grabbing mouse events) Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4819 retrieving revision 1.4820 diff -u -b -r1.4819 -r1.4820 --- ChangeLog 9 Nov 2007 21:27:48 -0000 1.4819 +++ ChangeLog 9 Nov 2007 21:36:05 -0000 1.4820 @@ -1,5 +1,7 @@ 2007-11-09 Sandro Santilli <[EMAIL PROTECTED]> + * testsuite/misc-ming.all/DrawingApiTest.as: add test that would have + exposed the just-fixed silly bug. * server/shape.cpp (withinSquareDistance): fixed silly bug checking for lines connecting origin with end of each edge rather then all edges. Prepared (but not implemented) section for curves. _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit