[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r9879: Add failing test in matrix_te
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r9879: Add failing test in matrix_test.swf (sign related, triggered on _rotation set) |
Date: |
Tue, 30 Sep 2008 16:34:33 -0400 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9879
committer: Sandro Santilli <address@hidden>
branch nick: gnash-head
timestamp: Tue 2008-09-30 16:34:33 -0400
message:
Add failing test in matrix_test.swf (sign related, triggered on _rotation set)
modified:
testsuite/actionscript.all/MovieClip.as
testsuite/misc-ming.all/matrix_test.c
=== modified file 'testsuite/actionscript.all/MovieClip.as'
--- a/testsuite/actionscript.all/MovieClip.as 2008-09-30 15:15:39 +0000
+++ b/testsuite/actionscript.all/MovieClip.as 2008-09-30 20:34:33 +0000
@@ -103,7 +103,7 @@
#endif
#if OUTPUT_VERSION >= 8
- check_totals(797); // SWF8+
+ check_totals(799); // SWF8+
#endif
play();
@@ -1481,8 +1481,14 @@
_root._x = 30;
_root._y = 20;
+
+check_equals(_root.transform.matrix.toString(), "(a=1, b=0, c=0, d=1, tx=30,
ty=20)");
+
//_root._xscale = -300; // NOTE: gnash breaks the _root's matrix if we set
_xscale here ! you can tell by failing localToGLobal/globalToLocal tests
_root._yscale = -200;
+
+check_equals(_root.transform.matrix.toString(), "(a=1, b=0, c=0, d=-2, tx=30,
ty=20)");
+
_root._rotation = -90;
check_equals(_root.transform.matrix.a, 0);
=== modified file 'testsuite/misc-ming.all/matrix_test.c'
--- a/testsuite/misc-ming.all/matrix_test.c 2008-09-30 17:14:16 +0000
+++ b/testsuite/misc-ming.all/matrix_test.c 2008-09-30 20:34:33 +0000
@@ -897,43 +897,66 @@
it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
SWFDisplayItem_setMatrix(it, 1, 0, 0, -2, 200, 200);
check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'169.95,139.9 230.05,260.1'");
- check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=0,
d=-2, tx=200, ty=200)'");
-
+ check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0,
c=0, d=-2, tx=200, ty=200)'");
check_equals(mo, "staticmc._xscale", "100");
check_equals(mo, "staticmc._rotation", "0");
check_equals(mo, "staticmc._yscale", "200");
+
add_actions(mo, "staticmc._yscale = 100;"); // swap _yscale sign using
ActionScript
- check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=0,
c=0, d=-1, tx=200, ty=200)'");
+ check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1,
b=0, c=0, d=-1, tx=200, ty=200)'");
check_equals(mo, "staticmc._yscale", "100");
check_equals(mo, "staticmc._rotation", "0");
check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,170
230,230'");
- add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap
_yscale sign using ActionScript
- check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'169.95,169.95 230.05,230.05'");
- check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=0,
d=1, tx=200, ty=200)'");
- add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap
_yscale sign using ActionScript
- check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=0,
c=0, d=-1, tx=200, ty=200)'");
- check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'169.95,169.95 230.05,230.05'");
-
- check_equals(mo, "staticmc._xscale", "100");
+
+ add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap
_yscale sign using ActionScript
+ check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'169.95,169.95 230.05,230.05'");
+ check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0,
c=0, d=1, tx=200, ty=200)'");
+ check_equals(mo, "staticmc._yscale", "-100");
+ check_equals(mo, "staticmc._xscale", "100");
+ check_equals(mo, "staticmc._rotation", "0");
+
+ add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap
_yscale sign using ActionScript
+ check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1,
b=0, c=0, d=-1, tx=200, ty=200)'");
+ check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'169.95,169.95 230.05,230.05'");
+ check_equals(mo, "staticmc._yscale", "100");
+ check_equals(mo, "staticmc._xscale", "100");
+ check_equals(mo, "staticmc._rotation", "0");
+
add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap
_xscale sign using ActionScript
- check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1,
b=0, c=0, d=-1, tx=200, ty=200)'");
+ check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1,
b=0, c=0, d=-1, tx=200, ty=200)'");
check_equals(mo, "staticmc._xscale", "-100");
+ check_equals(mo, "staticmc._yscale", "100");
+ check_equals(mo, "staticmc._rotation", "0");
check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,170
230,230'");
add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using
ActionScript
- check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1,
b=-0.03, c=0.03, d=-1, tx=200, ty=200)'");
+ check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1,
b=-0.03, c=0.03, d=-1, tx=200, ty=200)'");
check_equals(mo, "staticmc._yscale", "100");
check_equals(mo, "staticmc._xscale", "-100");
check_equals(mo, "staticmc._rotation", "2");
check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'169,169
231,231'");
add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using
ActionScript
- check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1,
b=0.03, c=-0.03, d=-1, tx=200, ty=200)'");
+ check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1,
b=0.03, c=-0.03, d=-1, tx=200, ty=200)'");
check_equals(mo, "staticmc._yscale", "100");
check_equals(mo, "staticmc._xscale", "-100");
check_equals(mo, "staticmc._rotation", "-2");
check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'169,169
231,231'");
+ add_actions(mo, "staticmc._rotation = -90;"); // change _rotation using
ActionScript
+ check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=0,
b=1, c=-1, d=0, tx=200, ty=200)'");
+ check_equals(mo, "staticmc._yscale", "100");
+ check_equals(mo, "staticmc._xscale", "-100");
+ check_equals(mo, "staticmc._rotation", "-90");
+ check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,170
230,230'");
+
+ add_actions(mo, "staticmc._yscale = -100;"); // change _rotation using
ActionScript
+ check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=0,
b=1, c=1, d=0, tx=200, ty=200)'");
+ check_equals(mo, "staticmc._yscale", "-100");
+ check_equals(mo, "staticmc._xscale", "-100");
+ check_equals(mo, "staticmc._rotation", "-90");
+ check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,170
230,230'");
+
SWFMovie_nextFrame(mo);
SWFDisplayItem_remove(it);
@@ -1778,7 +1801,40 @@
SWFMovie_nextFrame(mo);
- add_actions(mo, "_root.totals(1011); stop();");
+ SWFDisplayItem_remove(it);
+ it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
+ SWFDisplayItem_setMatrix(it, 1, 0, 0, 1, 0, 0);
+ check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'-30.05,-30.05 30.05,30.05'");
+ check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0,
c=0, d=1, tx=0, ty=0)'");
+ check_equals(mo, "staticmc._rotation", "0");
+ check_equals(mo, "staticmc._xscale", "100");
+ check_equals(mo, "staticmc._yscale", "100");
+
+ add_actions(mo, "staticmc._yscale = -200;"); // change _yscale using
ActionScript
+ check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'-30.05,-60.1 30.05,60.1'");
+ check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0,
c=0, d=-2, tx=0, ty=0)'");
+ check_equals(mo, "staticmc._rotation", "0");
+ check_equals(mo, "staticmc._xscale", "100");
+ check_equals(mo, "staticmc._yscale", "-200");
+
+ add_actions(mo, "staticmc._rotation = -90;"); // change _rotation using
ActionScript
+ check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'-60.1,-30.05 60.1,30.05'");
+ xcheck_equals(mo, "staticmc.transform.matrix.toString()", "'(a=0, b=-1,
c=-2, d=0, tx=0, ty=0)'");
+ check_equals(mo, "staticmc._rotation", "-90");
+ check_equals(mo, "staticmc._xscale", "100");
+ check_equals(mo, "staticmc._yscale", "-200");
+
+ add_actions(mo, "staticmc._rotation = 90;"); // change _rotation using
ActionScript
+ check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'-60.1,-30.05 60.1,30.05'");
+ xcheck_equals(mo, "staticmc.transform.matrix.toString()", "'(a=0, b=1,
c=2, d=0, tx=0, ty=0)'");
+ check_equals(mo, "staticmc._rotation", "90");
+ check_equals(mo, "staticmc._xscale", "100");
+ check_equals(mo, "staticmc._yscale", "-200");
+
+
+ SWFMovie_nextFrame(mo);
+
+ add_actions(mo, "_root.totals(1048); stop();");
SWFMovie_nextFrame(mo);
//Output movie
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r9879: Add failing test in matrix_test.swf (sign related, triggered on _rotation set),
Sandro Santilli <=