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


From: Zou Lunkai
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/duplica...
Date: Thu, 19 Apr 2007 05:23:31 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  07/04/19 05:23:30

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: duplicate_movie_clip_test.c 
        libbase        : tu_types.h 
        server         : cxform.h 

Log message:
        more tests

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2922&r2=1.2923
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/duplicate_movie_clip_test.c?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/tu_types.h?cvsroot=gnash&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/gnash/server/cxform.h?cvsroot=gnash&r1=1.2&r2=1.3

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2922
retrieving revision 1.2923
diff -u -b -r1.2922 -r1.2923
--- ChangeLog   18 Apr 2007 21:05:15 -0000      1.2922
+++ ChangeLog   19 Apr 2007 05:23:30 -0000      1.2923
@@ -1,3 +1,12 @@
+2007-04-19 Zou Lunkai <address@hidden>
+
+       * testsuite/misc-ming.all/duplicate_movie_clip_test.c
+         more tests.
+       * libbase/tu_types.h
+         drop SDL integer types 
+       * server/cxform.h
+         replace inttypes.h with tu_types.h, hopefully more portable
+         
 2007-04-18 Sandro Santilli <address@hidden>
 
        * server/BitmapMovieInstance.cpp: make sure

Index: testsuite/misc-ming.all/duplicate_movie_clip_test.c
===================================================================
RCS file: 
/sources/gnash/gnash/testsuite/misc-ming.all/duplicate_movie_clip_test.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- testsuite/misc-ming.all/duplicate_movie_clip_test.c 18 Apr 2007 13:24:44 
-0000      1.2
+++ testsuite/misc-ming.all/duplicate_movie_clip_test.c 19 Apr 2007 05:23:30 
-0000      1.3
@@ -31,8 +31,8 @@
 main(int argc, char** argv)
 {
   SWFMovie mo;
-  SWFMovieClip  mc, dejagnuclip;
-  SWFDisplayItem it;
+  SWFMovieClip  mc1, mc2, dejagnuclip;
+  SWFDisplayItem it1, it2;
   SWFShape  sh_red;
 
   const char *srcdir=".";
@@ -52,36 +52,77 @@
   dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 
800, 600);
   SWFMovie_add(mo, (SWFBlock)dejagnuclip);
   add_actions(mo, "x1=0; x2=0; x3=0;");
-  SWFMovie_nextFrame(mo); 
+  SWFMovie_nextFrame(mo);  /* 1st frame */
 
   
-  mc = newSWFMovieClip();
+  mc1 = newSWFMovieClip();
   sh_red = make_fill_square (100, 300, 60, 60, 255, 0, 0, 255, 0, 0);
-  SWFMovieClip_add(mc, (SWFBlock)sh_red);  
-  add_clip_actions(mc, "stop();");
-  SWFMovieClip_nextFrame(mc);
-
-
-  it = SWFMovie_add(mo, (SWFBlock)mc); 
-  SWFDisplayItem_setDepth(it, 10); 
-  SWFDisplayItem_setName(it, "mc"); 
-  
-  add_actions(mo, " mc.onLoad = function () {};"
-                  " mc.prop1 = 10; "
-                  " duplicateMovieClip('mc', 'dup', 1); ");
-  SWFMovie_nextFrame(mo); 
-  
-  
-  check_equals(mo, "mc.prop1", "10");
-  check_equals(mo, "typeof(mc.onLoad)", "'function'");
-  check_equals(mo, "mc.getDepth()", "-16374");
-  check_equals(mo, "dup.prop1", "undefined");  // user defined property will 
not be duplicated
-  check_equals(mo, "typeof(dup.onLoad)", "'undefined'"); //user defined event 
will not be duplicated
-  check_equals(mo, "dup.getDepth()", "1");
+  SWFMovieClip_add(mc1, (SWFBlock)sh_red);  
+  add_clip_actions(mc1, "stop();");
+  SWFMovieClip_nextFrame(mc1);
+
+  mc2 = newSWFMovieClip();
+  sh_red = make_fill_square (100, 200, 60, 60, 255, 0, 0, 255, 0, 0);
+  SWFMovieClip_add(mc2, (SWFBlock)sh_red);  
+  add_clip_actions(mc2, "stop();");
+  SWFMovieClip_nextFrame(mc2);
+
+  it1 = SWFMovie_add(mo, (SWFBlock)mc1); 
+  SWFDisplayItem_setDepth(it1, 10); 
+  SWFDisplayItem_setName(it1, "mc1"); 
+
+  it2 = SWFMovie_add(mo, (SWFBlock)mc2); 
+  SWFDisplayItem_setDepth(it2, 20); 
+  SWFDisplayItem_setName(it2, "mc2"); 
+  SWFDisplayItem_addAction(it2,
+    compileSWFActionCode(" _root.note('onClipLoad triggered'); "
+                         " _root.x1 = _root.x1 + 1; "),
+    SWFACTION_ONLOAD);  
+  SWFDisplayItem_addAction(it2,
+    compileSWFActionCode(" _root.note('onClipEnterFrame triggered'); "
+                         " _root.x2 = _root.x2 + 1; "),
+    SWFACTION_ENTERFRAME);  
+  SWFDisplayItem_addAction(it2,
+    compileSWFActionCode(" _root.note('onClipUnload triggered'); "
+                         " _root.x3 = _root.x3 + 1; "),
+    SWFACTION_UNLOAD); 
+
+  add_actions(mo, " mc1.onLoad = function () {}; "
+                  " mc1.prop1 = 10; "
+                  " duplicateMovieClip('mc1', 'dup1', 1); "
+                  " mc2.onLoad = function () {}; "
+                  " duplicateMovieClip('mc2', 'dup2', 2); " );
+  SWFMovie_nextFrame(mo); /* 2nd frame */
+  
+  
+  check_equals(mo, "mc1.prop1", "10");
+  check_equals(mo, "typeof(mc1.onLoad)", "'function'");
+  check_equals(mo, "mc1.getDepth()", "-16374");
+  /* user defined property will not be duplicated */
+  check_equals(mo, "dup1.prop1", "undefined");  
+  /* user defined event will not be duplicated */
+  check_equals(mo, "typeof(dup1.onLoad)", "'undefined'"); 
+  check_equals(mo, "dup1.getDepth()", "1");
+  /* check user defined onLoad */
+  check_equals(mo, "typeof(mc2.onLoad)", "'function'");
+  /* onClipEvent does not define a function */
+  check_equals(mo, "typeof(mc2.onEnterFrame)", "'undefined'");
+  /* user defined event will not be duplicated */
+  check_equals(mo, "typeof(dup2.onLoad)", "'undefined'"); 
+  check_equals(mo, "_root.x1", "2");
+  check_equals(mo, "_root.x2", "2");
+  SWFMovie_nextFrame(mo); /* 3rd frame */
+  
+  SWFDisplayItem_remove(it1);
+  SWFDisplayItem_remove(it2);
+  add_actions(mo, " dup2.removeMovieClip(); ");
+  SWFMovie_nextFrame(mo); /* 4th frame */
+
+  check_equals(mo, "_root.x1", "2");
+  check_equals(mo, "_root.x2", "3");
+  check_equals(mo, "_root.x3", "2");  
   add_actions(mo, " _root.totals(); stop(); ");
-  SWFMovie_nextFrame(mo); 
-  
-  
+  SWFMovie_nextFrame(mo); /* 5th frame */
   //Output movie
   puts("Saving " OUTPUT_FILENAME );
   SWFMovie_save(mo, OUTPUT_FILENAME);

Index: libbase/tu_types.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/tu_types.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- libbase/tu_types.h  11 Apr 2007 17:54:21 -0000      1.33
+++ libbase/tu_types.h  19 Apr 2007 05:23:30 -0000      1.34
@@ -17,7 +17,7 @@
 // 
 //
 
-/* $Id: tu_types.h,v 1.33 2007/04/11 17:54:21 bjacques Exp $ */
+/* $Id: tu_types.h,v 1.34 2007/04/19 05:23:30 zoulunkai Exp $ */
 
 #ifndef TU_TYPES_H
 #define TU_TYPES_H
@@ -30,15 +30,15 @@
 #include "tu_config.h"
 
 #if defined(_WIN32) || defined(WIN32)
-#include <sdl_stdinc.h>        
-//typedef unsigned char uint8_t;
-//typedef char int8_t;
-//typedef unsigned short int uint16_t;
-//typedef short int int16_t;
-//typedef unsigned int uint32_t;
-//typedef int int32_t;
-//typedef unsigned __int64 uint64_t;
-//typedef __int64 int64_t;
+//#include <sdl_stdinc.h>      
+typedef unsigned char uint8_t;
+typedef signed char int8_t;
+typedef unsigned short int uint16_t;
+typedef signed short int int16_t;
+typedef unsigned int uint32_t;
+typedef signed int int32_t;
+typedef unsigned __int64 uint64_t;
+typedef __int64 int64_t;
 # define __PRETTY_FUNCTION__ __FUNCDNAME__
 # define BYTE_ORDER SDL_BYTEORDER
 #else

Index: server/cxform.h
===================================================================
RCS file: /sources/gnash/gnash/server/cxform.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- server/cxform.h     11 Apr 2007 16:52:23 -0000      1.2
+++ server/cxform.h     19 Apr 2007 05:23:30 -0000      1.3
@@ -22,7 +22,7 @@
 #endif
 
 #include "tu_config.h" // for DSOEXPORT
-#include <inttypes.h> // for uint8_t
+#include "tu_types.h" // for uint8_t
 
 #include <iosfwd>
 




reply via email to

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