thekid          Sun May 16 16:33:45 2004 EDT

  Modified files:              
    /php-src/ext/sybase_ct/tests        test_types.phpt 
  Log:
  - Fixed test for LONG_MIN / LONG_MAX for 64-bit platforms
  
http://cvs.php.net/diff.php/php-src/ext/sybase_ct/tests/test_types.phpt?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/sybase_ct/tests/test_types.phpt
diff -u php-src/ext/sybase_ct/tests/test_types.phpt:1.2 
php-src/ext/sybase_ct/tests/test_types.phpt:1.3
--- php-src/ext/sybase_ct/tests/test_types.phpt:1.2     Sat Jan 24 10:18:52 2004
+++ php-src/ext/sybase_ct/tests/test_types.phpt Sun May 16 16:33:44 2004
@@ -6,18 +6,21 @@
 <?php
 /* This file is part of PHP test framework for ext/sybase_ct
  *
- * $Id: test_types.phpt,v 1.2 2004/01/24 15:18:52 thekid Exp $ 
+ * $Id: test_types.phpt,v 1.3 2004/05/16 20:33:44 thekid Exp $ 
  */
 
   require('test.inc');
 
+  define('LONG_MAX', is_int(2147483648) ? 9223372036854775807 : 2147483647);
+  define('LONG_MIN', -LONG_MAX - 1);
+
   $db= sybase_connect_ex();
   var_dump(sybase_select_ex($db, 'select 
     1 as "integer", 
-    -2147483647 as "integer_min",
-    -2147483648 as "integer_min_exceed",
-    2147483647 as "integer_max",
-    2147483648 as "integer_max_exceed",
+    '.(LONG_MIN).' as "integer_min",
+    '.(LONG_MIN - 1).' as "integer_min_exceed",
+    '.(LONG_MAX).' as "integer_max",
+    '.(LONG_MAX + 1).' as "integer_max_exceed",
     1.0  as "float", 
     $22.36 as "money",
     "Binford" as "string",
@@ -33,10 +36,10 @@
 --EXPECTF--
 >>> Query: select 
     1 as "integer", 
-    -2147483647 as "integer_min",
-    -2147483648 as "integer_min_exceed",
-    2147483647 as "integer_max",
-    2147483648 as "integer_max_exceed",
+    -%s as "integer_min",
+    -%s as "integer_min_exceed",
+    %s as "integer_max",
+    %s as "integer_max_exceed",
     1.0  as "float", 
     $22.36 as "money",
     "Binford" as "string",
@@ -53,13 +56,13 @@
     ["integer"]=>
     int(1)
     ["integer_min"]=>
-    int(-2147483647)
+    int(-%s)
     ["integer_min_exceed"]=>
-    float(-2147483648)
+    float(-%s)
     ["integer_max"]=>
-    int(2147483647)
+    int(%s)
     ["integer_max_exceed"]=>
-    float(2147483648)
+    float(%s)
     ["float"]=>
     float(1)
     ["money"]=>

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

Reply via email to