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/key_eve...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/key_eve...
Date: Thu, 22 Nov 2007 08:04:48 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/11/22 08:04:48

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: key_event_test.c 
                                 key_event_testrunner.cpp 

Log message:
        make the test more verbose

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4915&r2=1.4916
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/key_event_test.c?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/key_event_testrunner.cpp?cvsroot=gnash&r1=1.15&r2=1.16

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4915
retrieving revision 1.4916
diff -u -b -r1.4915 -r1.4916
--- ChangeLog   22 Nov 2007 07:42:07 -0000      1.4915
+++ ChangeLog   22 Nov 2007 08:04:47 -0000      1.4916
@@ -1,5 +1,6 @@
 2007-11-22 Sandro Santilli <address@hidden>
 
+       * testsuite/misc-ming.all/key_event_test.c: make the test more verbose
        * server/movie_root.cpp (cleanupUnloadedListeners): erase the
          correct iterator (thanks zou for noticing).
 

Index: testsuite/misc-ming.all/key_event_test.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/key_event_test.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- testsuite/misc-ming.all/key_event_test.c    16 Nov 2007 07:43:53 -0000      
1.7
+++ testsuite/misc-ming.all/key_event_test.c    22 Nov 2007 08:04:48 -0000      
1.8
@@ -83,15 +83,15 @@
   add_actions(mo, 
     "_root.var1 = 0; _root.var2 = 0;"
     "l = new Object();"
-    "l.onKeyDown = function () {_root.var1+=1; _root.Play(); }; "
-    "l.onKeyUp = function () { _root.var2+=1;}; "
+    "l.onKeyDown = function () { _root.note('l.onKeyDown'); _root.var1+=1; 
_root.Play(); }; "
+    "l.onKeyUp = function () { _root.note('l.onKeyUp'); _root.var2+=1;}; "
     " Key.addListener(l);"
     "check_equals(typeof(Key), 'object');"
     "check_equals(typeof(onKeyUp), 'undefined');"
     "check_equals(typeof(onKeyDown), 'undefined');"
     "check_equals(typeof(onKeyPress), 'undefined');"
     "stop();"
-    "_root.note('press a single key to continue the test');"
+    "_root.note('1. Press a single key to continue the test');"
   );
   SWFMovie_nextFrame(mo);  // _root frame2
 
@@ -103,7 +103,7 @@
     "check_equals(var2, 1); "
     "Key = 3;"
     "check_equals(typeof(Key), 'number');"
-    "_root.note('press a single key to continue the test');"
+    "_root.note('2. Press a single key to continue the test');"
     );
   SWFMovie_nextFrame(mo);  // _root frame4
   
@@ -116,9 +116,10 @@
     "delete Key; "
     "check_equals(typeof(Key), 'object');"
     "Key.removeListener(l);"
-    "_root.note('press a single key to continue the test');"
+    "_root.note('3. Press a single key to continue the test');"
     "obj1=new Object(); "
     " obj1.onKeyDown=function() {"
+    "   _root.note('obj1.onKeyDown');"
     "   _root.play();"
     "}; "
     " Key.addListener(obj1); "
@@ -139,7 +140,7 @@
   
   it = add_static_mc(mo, "listenerClip1", 20);
   SWFDisplayItem_addAction(it,
-    newSWFAction(" _root.note('onClipKeyDown triggered'); "
+    newSWFAction(" _root.note('listenerClip2.onClipKeyDown'); "
                  " _root.test2++; "
                  "if(!_root.haslooped1){"
                  "   _root.haslooped1=true;"
@@ -151,7 +152,7 @@
     SWFACTION_KEYDOWN);  
   add_actions(mo,
     "stop();"
-    "_root.note('press a single key to continue the test');"
+    "_root.note('4. Press a single key to continue the test');"
   );
   SWFMovie_nextFrame(mo);  // _root frame9
   
@@ -166,12 +167,12 @@
   
   add_actions(mo, 
     "stop();"
-    "_root.note('press a single key to continue the test');"
+    "_root.note('5. Press a single key to continue the test');"
     "_root.createEmptyMovieClip('dynamic_mc', -10);"
     "dynamic_mc.onKeyDown = function() "
     "{"
+    "   _root.note('dynamic_mc.onKeyDown triggered');"
     "   _root.check_equals(this, _root.dynamic_mc);"
-    "   _root.note('user defined KeyDown triggered');"
     "   _root.test3++;"
     "   if(!_root.haslooped2){"
     "       _root.haslooped2=true;"
@@ -193,11 +194,11 @@
   // test4:
   //    GC test
   add_actions(mo, 
-    "_root.note('press a single key to continue the test');"
+    "_root.note('6. Press a single key to continue the test');"
     " obj2 = new Object(); "
     " obj2.x = 100; "
     " obj2.onKeyDown = function () { "
-    "   _root.note('user defined KeyDown triggered');"
+    "   _root.note('obj2.onKeyDown triggered');"
     "   _root.test4++; "
     "   _root.objRef = this; "
     "   _root.play();"
@@ -214,7 +215,7 @@
   check_equals(mo, "_root.test4", "1");
   add_actions(mo,
     "stop();"
-    "_root.note('press a single key to continue the test');"
+    "_root.note('7. Press a single key to continue the test');"
     "Key.removeListener(objRef); "
     // check that objRef is still alive
     "check_equals(typeof(objRef), 'object');"
@@ -222,6 +223,7 @@
     "delete objRef;"
     "obj3=new Object(); "
     "obj3.onKeyDown=function() {"
+    "   _root.note('obj3.onKeyDown');"
     "   _root.gotoAndPlay(_currentframe+1);"
     "}; "
     "Key.addListener(obj3); "
@@ -244,39 +246,67 @@
   //      if not registered to the global Key object.
   it1 = add_static_mc(mo, "ls1", 30);
   SWFDisplayItem_addAction(it1,
-    compileSWFActionCode("_root.test5 += '+ls1';"),
+    compileSWFActionCode(
+       "_root.note('ls1.onClipKeyDown');"
+       "_root.test5 += '+ls1';"
+    ),
     SWFACTION_KEYDOWN);
   SWFMovie_nextFrame(mo);  // _root frame17
   
   it2 = add_static_mc(mo, "ls2", 31);
   SWFDisplayItem_addAction(it2,
-    compileSWFActionCode("_root.test5 += '+ls2'; "),
+    compileSWFActionCode(
+       "_root.note('ls2.onClipKeyDown');"
+       "_root.test5 += '+ls2';"
+    ),
     SWFACTION_KEYDOWN);
   SWFMovie_nextFrame(mo);  // _root frame18
    
   it3 = add_static_mc(mo, "ls3", 29);
   SWFDisplayItem_addAction(it3,
-    compileSWFActionCode("_root.test5 += '+ls3'; "),
+    compileSWFActionCode(
+       "_root.note('ls3.onClipKeyDown');"
+       "_root.test5 += '+ls3';"
+    ),
     SWFACTION_KEYDOWN);
   SWFMovie_nextFrame(mo);  // _root frame19
 
   add_actions(mo, 
     "obj1=new Object();"
-    "obj1.onKeyDown = function () { _root.test5 += '+obj1'; 
_root.gotoAndPlay(_root._currentframe+1);}; "
+    "obj1.onKeyDown = function () { "
+    "  _root.note('obj1.onKeyDown');"
+    "  _root.test5 += '+obj1'; "
+    "  _root.gotoAndPlay(_root._currentframe+1);"
+    "}; "
     "Key.addListener(obj1);"
-    "ls1.onKeyDown = function () {_root.test5 += '+ls1'; }; "
+    "ls1.onKeyDown = function () {"
+    "  _root.note('ls1.onKeyDown');"
+    "  _root.test5 += '+ls1';"
+    "}; "
     "Key.addListener(ls1);"
     "obj2=new Object();"
-    "obj2.onKeyDown = function () {_root.test5 += '+obj2'; }; "
+    "obj2.onKeyDown = function () {"
+    "  _root.note('obj2.onKeyDown');"
+    "  _root.test5 += '+obj2';"
+    "}; "
     "Key.addListener(obj2);"
-    "ls2.onKeyDown = function () {_root.test5 += '+ls2'; }; "
+    "ls2.onKeyDown = function () {"
+    "  _root.note('ls2.onKeyDown');"
+    "  _root.test5 += '+ls2';"
+    "}; "
     "Key.addListener(ls2);"
     "obj3=new Object();"
-    "obj3.onKeyDown = function () {_root.test5 += '+obj3'; }; "
+    "obj3.onKeyDown = function () {"
+    "  _root.note('obj3.onKeyDown');"
+    "  _root.test5 += '+obj3';"
+    "}; "
     "Key.addListener(obj3);"
-    "ls3.onKeyDown = function () {_root.test5 += '+ls3'; }; "
+    "ls3.onKeyDown = function () {"
+    "  _root.note('ls3.onKeyDown');"
+    "  _root.test5 += '+ls3';"
+    "}; "
     "stop(); "
-    "_root.note('press a single key to continue the test');"
+    "_root.note('8. Press a single key to continue the test');"
   );
   SWFMovie_nextFrame(mo);  // _root frame20
 
@@ -284,7 +314,7 @@
   
   add_actions(mo,
     "stop(); "
-    "_root.note('press a single key to continue the test');"
+    "_root.note('9. Press a single key to continue the test');"
   );
   SWFDisplayItem_remove(it1);
   SWFDisplayItem_remove(it2);

Index: testsuite/misc-ming.all/key_event_testrunner.cpp
===================================================================
RCS file: 
/sources/gnash/gnash/testsuite/misc-ming.all/key_event_testrunner.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- testsuite/misc-ming.all/key_event_testrunner.cpp    16 Nov 2007 07:43:53 
-0000      1.15
+++ testsuite/misc-ming.all/key_event_testrunner.cpp    22 Nov 2007 08:04:48 
-0000      1.16
@@ -10,8 +10,8 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
-* 
-* You should have received a copy of the GNU General Public License
+ * 
+ * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
@@ -180,6 +180,7 @@
   tester.pressKey(key::K);
   tester.releaseKey(key::K);
   tester.advance();
+
   // reached frame23, test finished
   check_equals(root->get_current_frame(), 22);
 }




reply via email to

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