tony2001                Wed Dec 21 12:16:25 2005 EDT

  Modified files:              
    /php-src/ext/wddx/tests     bug35410_64bit.phpt bug35410.phpt 
  Log:
  MFB: fix test, add test for 64bit platform
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/wddx/tests/bug35410_64bit.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/wddx/tests/bug35410_64bit.phpt
diff -u /dev/null php-src/ext/wddx/tests/bug35410_64bit.phpt:1.2
--- /dev/null   Wed Dec 21 12:16:25 2005
+++ php-src/ext/wddx/tests/bug35410_64bit.phpt  Wed Dec 21 12:16:25 2005
@@ -0,0 +1,76 @@
+--TEST--
+#35410 (wddx_deserialize() doesn't handle large ints as keys properly)
+--SKIPIF--
+<?php 
+       if (!extension_loaded("wddx")) print "skip"; 
+       if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+$wddx = <<<WDX
+<wddxpacket version="1.0">
+<header>
+<comment>Content Configuration File</comment>
+</header>
+<data>
+<struct>
+<var name="content_queries">
+<struct>
+<var name="content_113300831086270200">
+<struct>
+<var name="113301888545229100">
+<struct>
+<var name="max">
+<number>10</number>
+</var>
+<var name="cache">
+<number>4</number>
+</var>
+<var name="order">
+<struct>
+<var name="content_113300831086270200">
+<struct>
+<var name="CMS_BUILD">
+<string>desc</string>
+</var>
+</struct>
+</var>
+</struct>
+</var>
+</struct>
+</var>
+</struct>
+</var>
+</struct>
+</var>
+</struct>
+</data>
+</wddxpacket>
+WDX;
+
+var_dump(wddx_deserialize($wddx));
+?>
+--EXPECT--
+array(1) {
+  ["content_queries"]=>
+  array(1) {
+    ["content_113300831086270200"]=>
+    array(1) {
+      [113301888545229100]=>
+      array(3) {
+        ["max"]=>
+        int(10)
+        ["cache"]=>
+        int(4)
+        ["order"]=>
+        array(1) {
+          ["content_113300831086270200"]=>
+          array(1) {
+            ["CMS_BUILD"]=>
+            string(4) "desc"
+          }
+        }
+      }
+    }
+  }
+}
http://cvs.php.net/viewcvs.cgi/php-src/ext/wddx/tests/bug35410.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/wddx/tests/bug35410.phpt
diff -u php-src/ext/wddx/tests/bug35410.phpt:1.4 
php-src/ext/wddx/tests/bug35410.phpt:1.5
--- php-src/ext/wddx/tests/bug35410.phpt:1.4    Wed Dec 21 11:46:51 2005
+++ php-src/ext/wddx/tests/bug35410.phpt        Wed Dec 21 12:16:25 2005
@@ -1,7 +1,10 @@
 --TEST--
 #35410 (wddx_deserialize() doesn't handle large ints as keys properly)
 --SKIPIF--
-<?php if (!extension_loaded("wddx")) print "skip"; ?>
+<?php 
+       if (!extension_loaded("wddx")) print "skip"; 
+    if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
 --FILE--
 <?php
 $wddx = <<<WDX
@@ -53,7 +56,7 @@
   array(1) {
     ["content_113300831086270200"]=>
     array(1) {
-      [113301888545229100]=>
+      ["113301888545229100"]=>
       array(3) {
         ["max"]=>
         int(10)

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

Reply via email to