gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/interva...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/interva...
Date: Fri, 07 Dec 2007 08:34:42 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/12/07 08:34:42

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: intervalTest.as 

Log message:
        more self-contained tests, to reduce relying on MovieTester concept of 
time;

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5102&r2=1.5103
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/intervalTest.as?cvsroot=gnash&r1=1.6&r2=1.7

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5102
retrieving revision 1.5103
diff -u -b -r1.5102 -r1.5103
--- ChangeLog   7 Dec 2007 01:33:25 -0000       1.5102
+++ ChangeLog   7 Dec 2007 08:34:42 -0000       1.5103
@@ -1,4 +1,10 @@
+2007-12-07 Sandro Santilli <address@hidden>
+
+       * testsuite/misc-ming.all/intervalTest.as: more self-contained
+         tests, to reduce relying on MovieTester concept of time;
+
 2007-12-07 Zou Lunkai <address@hidden>
+
        * server/character.h, sprite_instance.cpp, dlist.{h,cpp}:
          deprecate the TimelineInfor class, it's no longer needed in the
          new timeline control design.

Index: testsuite/misc-ming.all/intervalTest.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/intervalTest.as,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- testsuite/misc-ming.all/intervalTest.as     26 Jul 2007 03:41:21 -0000      
1.6
+++ testsuite/misc-ming.all/intervalTest.as     7 Dec 2007 08:34:42 -0000       
1.7
@@ -23,26 +23,37 @@
 
 do_this = function() {
        ++this_counter;
-       xtrace("Doing this "+this_counter);
+       var now = getTimer();
+       var int = now-this_timer;
+       this_timer = now;
+       check(int >= this_ms, this_ms+" interval (this) called after " + int + 
" milliseconds [" + __FILE__ + ":" + __LINE__ + "]");
+       //note("Doing this "+this_counter+" after " + int + " milliseconds");
        if ( this_counter > 3 )
        {
                clearInterval(this_interval);
-               xtrace("This interval cleared ");
+               note("This interval cleared ");
                if ( this_counter > 4 )
                {
-                       totals();
+                       totals(16, __FILE__ + ":" + __LINE__ );
                        test_completed = 1;
+                       loadMovie("fscommand:quit", _level0);
                }
        }
 };
 
 do_that = function() {
        ++that_counter;
-       xtrace("Doing that "+that_counter);
+       var now = getTimer();
+       var int = now-that_timer;
+       that_timer = now;
+       check(int >= that_ms, that_ms+" interval (that) called after " + int + 
" milliseconds [" + __FILE__ + ":" + __LINE__ + "]");
+       //note("Doing that "+that_counter+" after " + int + " milliseconds");
        if ( that_counter > 3 )
        {
                clearInterval(that_interval);
-               xtrace("That interval cleared ");
+               note("That interval cleared ");
+               this_time = getTimer();
+               this_ms = 1;
                this_interval = setInterval(do_this, 1);
                // interval 1 is NOT reused
                check_equals(this_interval, 4); // interval 3 is set from 
within do_that
@@ -52,7 +63,7 @@
 push_args = function() {
        check_equals(arguments.length, 3);
        clearInterval(push_interval);
-       xtrace("Pushing "+arguments.length+" args");
+       note("Pushing "+arguments.length+" args");
        for (var i=0; i<arguments.length; i++)
        {
                pushed_args[i] = arguments[i];
@@ -60,10 +71,14 @@
 };
 
 this_counter = 0;
+this_timer = getTimer();
+this_ms = 0.0001;
 this_interval  = setInterval(do_this, 0.0001);
 check_equals(this_interval, 1);
 
 that_counter = 0;
+that_ms = 1000;
+that_timer = getTimer();
 that_interval  = setInterval(do_that, 1000);
 check_equals(that_interval, 2);
 




reply via email to

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