helly           Sun Jul 17 20:14:54 2005 EDT

  Added files:                 
    /php-src/ext/ming/tests     swfaction-new.phpt 

  Modified files:              
    /php-src/ext/ming   ming.c 
    /php-src/ext/ming/tests     swfaction.phpt 
  Log:
  - Provide distinction and distinct tests
  
http://cvs.php.net/diff.php/php-src/ext/ming/ming.c?r1=1.76&r2=1.77&ty=u
Index: php-src/ext/ming/ming.c
diff -u php-src/ext/ming/ming.c:1.76 php-src/ext/ming/ming.c:1.77
--- php-src/ext/ming/ming.c:1.76        Sun Jul 17 19:58:39 2005
+++ php-src/ext/ming/ming.c     Sun Jul 17 20:14:49 2005
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: ming.c,v 1.76 2005/07/17 23:58:39 helly Exp $ */
+/* $Id: ming.c,v 1.77 2005/07/18 00:14:49 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -4068,6 +4068,16 @@
 
 #define CONSTANT(s,c) REGISTER_LONG_CONSTANT((s), (c), CONST_CS | 
CONST_PERSISTENT)
 
+#ifdef HAVE_NEW_MING
+       CONSTANT("MING_NEW",                    1);
+#else
+       CONSTANT("MING_NEW",                    0);
+#endif
+#ifdef HAVE_MING_ZLIB
+       CONSTANT("MING_ZLIB",                   1);
+#else
+       CONSTANT("MING_ZLIB",                   0);
+#endif
        /* flags for SWFButton_addShape */
        CONSTANT("SWFBUTTON_HIT",               SWFBUTTONRECORD_HITSTATE);
        CONSTANT("SWFBUTTON_DOWN",              SWFBUTTONRECORD_DOWNSTATE);
http://cvs.php.net/diff.php/php-src/ext/ming/tests/swfaction.phpt?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/ming/tests/swfaction.phpt
diff -u php-src/ext/ming/tests/swfaction.phpt:1.2 
php-src/ext/ming/tests/swfaction.phpt:1.3
--- php-src/ext/ming/tests/swfaction.phpt:1.2   Sun Jul 17 19:58:01 2005
+++ php-src/ext/ming/tests/swfaction.phpt       Sun Jul 17 20:14:53 2005
@@ -1,9 +1,12 @@
 --TEST--
 Ming: Simple SWFAction() test
 --SKIPIF--
-<?php if (!extension_loaded("ming")) print "skip"; ?>
+<?php
+if (!extension_loaded("ming")) die("skip"); 
+if (MING_NEW || MING_ZLIB) die("skip new ming");
+?>
 --FILE--
-<?php /* $Id: swfaction.phpt,v 1.2 2005/07/17 23:58:01 helly Exp $ */
+<?php /* $Id: swfaction.phpt,v 1.3 2005/07/18 00:14:53 helly Exp $ */
 
   $s = new SWFShape();
   $f = $s->addFill(0xff, 0, 0);
@@ -40,7 +43,7 @@
   $m->add(new SWFAction("gotoFrame(0); play();"));
   $m->nextFrame();
 
-  $m->save(dirname(__FILE__).'/test.swf', 0);
+  $m->save(dirname(__FILE__).'/test.swf');
   echo md5_file(dirname(__FILE__).'/test.swf'), "\n";
   unlink(dirname(__FILE__).'/test.swf');
 ?>

http://cvs.php.net/co.php/php-src/ext/ming/tests/swfaction-new.phpt?r=1.1&p=1
Index: php-src/ext/ming/tests/swfaction-new.phpt
+++ php-src/ext/ming/tests/swfaction-new.phpt
--TEST--
Ming: Simple SWFAction() test
--SKIPIF--
<?php
if (!extension_loaded("ming")) die("skip"); 
if (!MING_NEW && !MING_ZLIB) die("skip old ming");
?>
--FILE--
<?php /* $Id: swfaction-new.phpt,v 1.1 2005/07/18 00:14:53 helly Exp $ */

  $s = new SWFShape();
  $f = $s->addFill(0xff, 0, 0);
  $s->setRightFill($f);

  $s->movePenTo(-500,-500);
  $s->drawLineTo(500,-500);
  $s->drawLineTo(500,500);
  $s->drawLineTo(-500,500);
  $s->drawLineTo(-500,-500);

  $p = new SWFSprite();
  $i = $p->add($s);
  $i->setDepth(1);
  $p->nextFrame();

  for($n=0; $n<5; ++$n)
  {
    $i->rotate(-15);
    $p->nextFrame();
  }

  $m = new SWFMovie();
  $m->setBackground(0xff, 0xff, 0xff);
  $m->setDimension(6000,4000);

  $i = $m->add($p);
  $i->setDepth(1);
  $i->moveTo(1000,2000);
  $i->setName("box");

  $m->add(new SWFAction("_root.box._x += 3;"));
  $m->nextFrame();
  $m->add(new SWFAction("gotoFrame(0); play();"));
  $m->nextFrame();

  $m->save(dirname(__FILE__).'/test.swf');
  echo md5_file(dirname(__FILE__).'/test.swf'), "\n";
  unlink(dirname(__FILE__).'/test.swf');
?>
--EXPECT--
d0f09a7b6a14d3fe6d570367deb38633

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to