gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog testsuite/misc-swfc.all/Makefil...


From: Zou Lunkai
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-swfc.all/Makefil...
Date: Fri, 13 Jun 2008 09:17:29 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  08/06/13 09:17:29

Modified files:
        .              : ChangeLog 
        testsuite/misc-swfc.all: Makefile.am matrix_accuracy_test1.sc 
        testsuite/server: MatrixTest.cpp 

Log message:
        * testsuite/misc-swfc.all/matrix_accuracy_test1.sc, makefile.am: enable 
this test file.
        * testsuite/server/MatrixTest.cpp: add test for Matrix::invert().

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6916&r2=1.6917
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfc.all/Makefile.am?cvsroot=gnash&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfc.all/matrix_accuracy_test1.sc?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/server/MatrixTest.cpp?cvsroot=gnash&r1=1.14&r2=1.15

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6916
retrieving revision 1.6917
diff -u -b -r1.6916 -r1.6917
--- ChangeLog   13 Jun 2008 09:13:04 -0000      1.6916
+++ ChangeLog   13 Jun 2008 09:17:26 -0000      1.6917
@@ -6,6 +6,8 @@
          integers for x_translation and y_translation. Add a template function 
transform(point2d),
          since renderer agg and ogl use different point formats.
        * server/character.cpp, server/sprite_instance.cpp: take care of data 
types, minor cleanups.
+       * testsuite/misc-swfc.all/matrix_accuracy_test1.sc, makefile.am: enable 
this test file.
+       * testsuite/server/MatrixTest.cpp: add test for Matrix::invert().
        
 2008-06-12 Sandro Santilli <address@hidden>
 

Index: testsuite/misc-swfc.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-swfc.all/Makefile.am,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- testsuite/misc-swfc.all/Makefile.am 9 Jun 2008 20:53:53 -0000       1.35
+++ testsuite/misc-swfc.all/Makefile.am 13 Jun 2008 09:17:28 -0000      1.36
@@ -37,6 +37,7 @@
        gotoFrameFromInterval.sc \
        gotoFrameFromInterval2.sc \
        gotoFrameLabelAsFunction.sc \
+       matrix_accuracy_test1.sc \
        $(NULL)
 
 # These ones are the ones for which consistency check fail 

Index: testsuite/misc-swfc.all/matrix_accuracy_test1.sc
===================================================================
RCS file: 
/sources/gnash/gnash/testsuite/misc-swfc.all/matrix_accuracy_test1.sc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-swfc.all/matrix_accuracy_test1.sc    4 Jun 2008 03:44:23 
-0000       1.1
+++ testsuite/misc-swfc.all/matrix_accuracy_test1.sc    13 Jun 2008 09:17:28 
-0000      1.2
@@ -38,13 +38,13 @@
         check_equals(mc1._xscale, 100);
         check_equals(mc1._yscale, 100);
         mc1._rotation = 30;
-        check_equals(mc1._xscale, 100);
-        check_equals(mc1._yscale, 100);
+        xcheck_equals(mc1._xscale, 100);
+        xcheck_equals(mc1._yscale, 100);
         mc1._rotation = 60;
-        check_equals(mc1._xscale, 100);
-        check_equals(mc1._yscale, 100);
+        xcheck_equals(mc1._xscale, 100);
+        xcheck_equals(mc1._yscale, 100);
         mc1._xscale = 200;
-        check_equals(mc1._rotation, 60);
+        xcheck_equals(mc1._rotation, 60);
         
         // reset mc1 to normal status for later tests.
         mc1._xscale = 100; 
@@ -54,21 +54,21 @@
 .frame 3
     .action:
         mc1._x = 0x3fffffff;
-        xcheck_equals(mc1._x, -1);
+        check_equals(mc1._x, -1);
         mc1._y = 0x3fffff00;
-        xcheck_equals(mc1._y, -256);
+        check_equals(mc1._y, -256);
         mc1._x = mc1._y = 100;
         
         mc1._xscale = -1;
-        check_equals(mc1._xscale, -1);
+        xcheck_equals(mc1._xscale, -1);
         mc1._xscale = 4294967295.0; // (unsigned)(0xffffffff);
         xcheck_equals(mc1._xscale, 4294967295.0);
         xcheck_equals(mc1._width, 2359295);
         check_equals(mc1._height, 30);
         mc1._yscale = 65536 * 100;
-        xcheck_equals(mc1._height, 0);
+        check_equals(mc1._height, 0);
         mc1._yscale = 65530 * 100;
-        xcheck_equals(mc1._height, 180);
+        check_equals(mc1._height, 180);
         
         // reset mc1 to normal status for later tests.
         // Gnash aborts without this.

Index: testsuite/server/MatrixTest.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/server/MatrixTest.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- testsuite/server/MatrixTest.cpp     10 Jun 2008 08:17:46 -0000      1.14
+++ testsuite/server/MatrixTest.cpp     13 Jun 2008 09:17:29 -0000      1.15
@@ -72,9 +72,8 @@
        check_equals(identity.get_y_translation(), 0);
 
        // The inverse of identity is still the identity
-       matrix invert;
-       invert.set_inverse(identity);
-       check_equals(invert, identity);
+       matrix mat;
+       check_equals(mat.invert(), identity);
 
        //---------------------------------------------
        // Test canonic parameter setting and getting
@@ -218,6 +217,19 @@
        m1.transform(&r, p2);
        check_equals(r.x, 100);
        check_equals(r.y, 100);
+
+       // test matrix invert
+    m1.set_identity();
+    m1.set_translation(50*20, -30*20);
+    m1.set_scale(0.5, 2);
+    m1.set_rotation(90*3.141593/180);
+    
+    matrix m1_inverse = m1;
+    m1_inverse.invert();
+    m1_inverse.concatenate(m1); 
+
+    check_equals(m1_inverse.get_x_translation(), 0);    
+    check_equals(m1_inverse.get_y_translation(), 0);  
 #endif
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]