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


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil...
Date: Tue, 12 Feb 2008 18:29:19 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/02/12 18:29:19

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: Makefile.am 
Added files:
        testsuite/misc-ming.all: instanceNameTest.c 

Log message:
        Add a test showing that NO name is different then EMPTY name
        in a PlaceObject tag (previous Ben's patch broke this).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5624&r2=1.5625
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.177&r2=1.178
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/instanceNameTest.c?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5624
retrieving revision 1.5625
diff -u -b -r1.5624 -r1.5625
--- ChangeLog   12 Feb 2008 16:48:37 -0000      1.5624
+++ ChangeLog   12 Feb 2008 18:29:18 -0000      1.5625
@@ -1,3 +1,9 @@
+2008-02-12 Sandro Santilli <address@hidden>
+
+       * testsuite/misc-ming.all/: Makefile.am, instanceNameTest.c:
+         Add a test showing that NO name is different then EMPTY name
+         in a PlaceObject tag (previous Ben's patch broke this).
+
 2008-02-12 Benjamin Wolsey <address@hidden>
 
        * server/stream.{cpp,h}: drop buggy char* read_string()

Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -b -r1.177 -r1.178
--- testsuite/misc-ming.all/Makefile.am 26 Jan 2008 12:31:11 -0000      1.177
+++ testsuite/misc-ming.all/Makefile.am 12 Feb 2008 18:29:19 -0000      1.178
@@ -163,6 +163,8 @@
        opcode_guard_test \
        runtime_vm_stack_test \
        new_child_in_unload_test \
+       instanceNameTest \
+       instanceNameTestRunner \
        $(NULL)
 
 if MING_VERSION_0_4
@@ -1644,6 +1646,18 @@
        Video-EmbedSquareTest.swf       \
        $(NULL)
 
+instanceNameTest_SOURCES =     \
+       instanceNameTest.c      \
+       $(NULL)
+instanceNameTest_LDADD = libgnashmingutils.la
+
+instanceNameTest.swf: instanceNameTest
+       ./instanceNameTest $(top_srcdir)/testsuite/media
+
+instanceNameTestRunner: $(srcdir)/../generic-testrunner.sh instanceNameTest.swf
+       sh $< $(top_builddir) instanceNameTest.swf > $@
+       chmod 755 $@
+
 Dejagnu_SOURCES =      \
        Dejagnu.c       \
        $(NULL)

Index: testsuite/misc-ming.all/instanceNameTest.c
===================================================================
RCS file: testsuite/misc-ming.all/instanceNameTest.c
diff -N testsuite/misc-ming.all/instanceNameTest.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/instanceNameTest.c  12 Feb 2008 18:29:19 -0000      
1.1
@@ -0,0 +1,100 @@
+/* 
+ *   Copyright (C) 2008 Free Software Foundation, Inc.
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * 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
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */ 
+
+/*
+ *  Test that instance name are syntezed only if a name isn't given
+ *  at all (empty name is still a name).
+ *  TODO: we may test other name syntesis here, in particular for other
+ *  kind of characters..
+ */
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 6
+#define OUTPUT_FILENAME "instanceNameTest.swf"
+
+
+int
+main(int argc, char** argv)
+{
+  SWFMovie mo;
+  SWFDisplayItem it1, it2, it3;
+  SWFMovieClip mc1, mc2, dejagnuclip;
+  SWFAction ac;
+  int i;
+  const char *srcdir=".";
+
+  if ( argc>1 ) 
+    srcdir=argv[1];
+  else
+  {
+      //fprintf(stderr, "Usage: %s <mediadir>\n", argv[0]);
+      //return 1;
+  }
+
+  Ming_init();
+  Ming_useSWFVersion (OUTPUT_VERSION);
+  
+  mo = newSWFMovie();
+  SWFMovie_setDimension(mo, 800, 600);
+  SWFMovie_setRate(mo, 12);
+
+  dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 
800, 600);
+  SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+  add_actions(mo, " haslooped1=false; haslooped2=false; haslooped3=false;"
+                  " mc1Initialized=0; mc1Unloaded=0;"
+                  " mc2Initialized=0; mc2Unloaded=0;"
+                  " mc3Initialized=0; mc3Unloaded=0;"
+                  " asOrder='0+';");
+  SWFMovie_nextFrame(mo); // frame1
+
+
+  mc1 = newSWFMovieClip();
+  SWFMovieClip_nextFrame(mc1);
+
+  mc2 = newSWFMovieClip();
+  SWFMovieClip_nextFrame(mc2);
+ 
+  /* An empty name ... */
+  it1 = SWFMovie_add(mo, (SWFBlock)mc1);  
+  SWFDisplayItem_setName(it1, ""); 
+  SWFDisplayItem_addAction(it1, newSWFAction(
+        "_root.check_equals(this._target, '/');"
+        ), SWFACTION_INIT); 
+
+  /* ... is different then no name at all. */
+  it2 = SWFMovie_add(mo, (SWFBlock)mc2);  
+  SWFDisplayItem_addAction(it2, newSWFAction(
+        "_root.check_equals(this._target, '/instance2');"
+        ), SWFACTION_INIT); 
+
+  SWFMovie_nextFrame(mo); // frame2
+  
+  add_actions(mo, "totals(2); stop();");
+  SWFMovie_nextFrame(mo);  // frame 15
+  //Output movie
+  puts("Saving " OUTPUT_FILENAME );
+  SWFMovie_save(mo, OUTPUT_FILENAME);
+
+  return 0;
+}




reply via email to

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