gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog testsuite/misc-mtasc.all/Dejagn...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-mtasc.all/Dejagn...
Date: Thu, 29 Nov 2007 08:32:39 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/11/29 08:32:39

Modified files:
        .              : ChangeLog 
        testsuite/misc-mtasc.all: Dejagnu.as check.as level5.as 
                                  level99.as levels.as 

Log message:
        Add support for checking number of run tests for MTASC framework.
        Add test for _level# depths in levels.as test.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5010&r2=1.5011
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/Dejagnu.as?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/check.as?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/level5.as?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/level99.as?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/levels.as?cvsroot=gnash&r1=1.3&r2=1.4

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5010
retrieving revision 1.5011
diff -u -b -r1.5010 -r1.5011
--- ChangeLog   29 Nov 2007 07:41:01 -0000      1.5010
+++ ChangeLog   29 Nov 2007 08:32:38 -0000      1.5011
@@ -1,5 +1,12 @@
 2007-11-29 Sandro Santilli <address@hidden>
 
+       * testsuite/misc-mtasc.all/: Dejagnu.as, check.as: add support for
+         check_totals, xcheck_totals.
+       * testsuite/misc-mtasc.all/: level5.as, level99.as, levels.as:
+         add test for _level# depths (fail) and total run test count.
+
+2007-11-29 Sandro Santilli <address@hidden>
+
        * configure.in: always look for X11 libs, even if build_fb is set (may 
be just
          one of the guis, not the only one)
        * gui/am-frag/qtopia.am: don't append to CXXFLAGS before it's

Index: testsuite/misc-mtasc.all/Dejagnu.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/Dejagnu.as,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- testsuite/misc-mtasc.all/Dejagnu.as 26 Jul 2007 03:41:21 -0000      1.3
+++ testsuite/misc-mtasc.all/Dejagnu.as 29 Nov 2007 08:32:39 -0000      1.4
@@ -65,7 +65,16 @@
         trace (msg);
     }
 
-    static function totals() {
+    static function testcount() {
+        var c = 0;
+        if ( passed ) c += passed;
+        if ( failed ) c += failed;
+        if ( xpassed ) c += xpassed;
+        if ( xfailed ) c += xfailed;
+        return c;
+    }
+
+    static function printtotals() {
         xtrace('#passed: '+ passed);
         xtrace('#failed: '+ failed);
         if ( xpassed ) {
@@ -74,7 +83,25 @@
         if ( xfailed ) {
             xtrace('#expected failures: '+ xfailed);
         }
+               xtrace('#total tests run: '+ testcount());
+    }
    
+    static function totals(exp, msg) {
+        var obt = testcount();
+        if ( exp != undefined && obt != exp ) {
+            fail('Test run '+obt+' (expected '+exp+') ['+msg+']');
+        } else {
+            pass('Test run '+obt+' ['+msg+']');
+        }
+    }
+
+    static function xtotals(exp, msg) {
+        var obt = testcount();
+        if ( exp != undefined && obt != exp ) {
+            xfail('Test run '+obt+' (expected '+exp+') ['+msg+']');
+        } else {
+            xpass('Test run '+obt+' ['+msg+']');
+        }
     }
 
     static function check_equals(obt, exp, msg) {
@@ -125,7 +152,7 @@
     }
 
     static function done() {
-        totals();
+        printtotals();
     }
 
 }

Index: testsuite/misc-mtasc.all/check.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/check.as,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- testsuite/misc-mtasc.all/check.as   27 Nov 2007 15:20:47 -0000      1.4
+++ testsuite/misc-mtasc.all/check.as   29 Nov 2007 08:32:39 -0000      1.5
@@ -42,6 +42,9 @@
 #define untested(text) Dejagnu.untested(text + _INFO_)
 #define unresolved(text) Dejagnu.unresolved(text + _INFO_)
 
+#define check_totals(n) Dejagnu.totals(n,  _INFO_)
+#define xcheck_totals(n) Dejagnu.xtotals(n,  _INFO_)
+
 #define note(text) Dejagnu.note(text + _INFO_);
 
 

Index: testsuite/misc-mtasc.all/level5.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/level5.as,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- testsuite/misc-mtasc.all/level5.as  7 Sep 2007 07:38:44 -0000       1.4
+++ testsuite/misc-mtasc.all/level5.as  29 Nov 2007 08:32:39 -0000      1.5
@@ -28,6 +28,9 @@
        {
                 check_equals(mc._currentframe, 1);
 
+                // Check our depth
+               xcheck_equals(mc.getDepth(), -16379);
+
                 // The ""+ is there to force conversion to a string
                 check_equals(""+mc, "_level5");
 

Index: testsuite/misc-mtasc.all/level99.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/level99.as,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- testsuite/misc-mtasc.all/level99.as 7 Sep 2007 07:38:44 -0000       1.4
+++ testsuite/misc-mtasc.all/level99.as 29 Nov 2007 08:32:39 -0000      1.5
@@ -28,6 +28,9 @@
        {
                 check_equals(mc._currentframe, 1);
 
+                // Check our depth
+               xcheck_equals(mc.getDepth(), -16285);
+
                 // The ""+ is there to force conversion to a string
                 check_equals(""+mc, "_level99");
 
@@ -48,6 +51,7 @@
                 _level5.testvar2 = "goodbye";
                 check_equals(_level5.testvar2, "goodbye");
 
+               check_totals(20);
                 Dejagnu.done();
        }
 }

Index: testsuite/misc-mtasc.all/levels.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/levels.as,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- testsuite/misc-mtasc.all/levels.as  26 Jul 2007 03:41:21 -0000      1.3
+++ testsuite/misc-mtasc.all/levels.as  29 Nov 2007 08:32:39 -0000      1.4
@@ -32,6 +32,9 @@
                 var test = new LevelsMain();
                 test.run();
 
+                // Check our depth
+               xcheck_equals(mc.getDepth(), -16384);
+
                 // The ""+ is there to force conversion to a string
                 check_equals(""+mc, "_level0");
        }




reply via email to

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