uw Tue, 29 Sep 2009 16:37:50 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=288953
Log:
Fixing test
Changed paths:
U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
U php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
Modified:
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
2009-09-29 16:35:42 UTC (rev 288952)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
2009-09-29 16:37:50 UTC (rev 288953)
@@ -50,17 +50,19 @@
if (in_array($i, $valid_attr))
continue;
$invalid_attr = $i;
- if (false !== ($tmp = @mysqli_stmt_attr_set($stmt,
$invalid_attr, 0)))
+ if (false !== ($tmp = @mysqli_stmt_attr_set($stmt,
$invalid_attr, 0))) {
printf("[006a] Expecting boolean/false for attribute
%d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp);
+ }
}
for ($i = 0; $i < 10; $i++) {
do {
- $invalid_attr = mt_rand(-1 * PHP_INT_MAX + 1,
PHP_INT_MAX);
+ $invalid_attr = mt_rand(-1 * (min(4294967296,
PHP_INT_MAX) + 1), min(4294967296, PHP_INT_MAX));
} while (in_array($invalid_attr, $valid_attr));
- if (false !== ($tmp = @mysqli_stmt_attr_set($stmt,
$invalid_attr, 0)))
+ if (false !== ($tmp = @mysqli_stmt_attr_set($stmt,
$invalid_attr, 0))) {
/* Although it may be desired to get false neither the
MySQL Client Library nor mysqlnd are supposed to detect invalid codes */
printf("[006b] Expecting boolean/true for attribute %d,
got %s/%s\n", $invalid_attr, gettype($tmp), $tmp);
+ }
}
$stmt->close();
Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
2009-09-29 16:35:42 UTC (rev 288952)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
2009-09-29 16:37:50 UTC (rev 288953)
@@ -50,17 +50,19 @@
if (in_array($i, $valid_attr))
continue;
$invalid_attr = $i;
- if (false !== ($tmp = @mysqli_stmt_attr_set($stmt,
$invalid_attr, 0)))
+ if (false !== ($tmp = @mysqli_stmt_attr_set($stmt,
$invalid_attr, 0))) {
printf("[006a] Expecting boolean/false for attribute
%d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp);
+ }
}
for ($i = 0; $i < 10; $i++) {
do {
- $invalid_attr = mt_rand(-1 * PHP_INT_MAX + 1,
PHP_INT_MAX);
+ $invalid_attr = mt_rand(-1 * (min(4294967296,
PHP_INT_MAX) + 1), min(4294967296, PHP_INT_MAX));
} while (in_array($invalid_attr, $valid_attr));
- if (false !== ($tmp = @mysqli_stmt_attr_set($stmt,
$invalid_attr, 0)))
+ if (false !== ($tmp = @mysqli_stmt_attr_set($stmt,
$invalid_attr, 0))) {
/* Although it may be desired to get false neither the
MySQL Client Library nor mysqlnd are supposed to detect invalid codes */
printf("[006b] Expecting boolean/true for attribute %d,
got %s/%s\n", $invalid_attr, gettype($tmp), $tmp);
+ }
}
$stmt->close();
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php