summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Hoyt <josh@janrain.com>2006-01-06 01:34:18 +0000
committerJosh Hoyt <josh@janrain.com>2006-01-06 01:34:18 +0000
commit8fc29714c0d7ebe235eaf9fcd3402bbda4d3c31d (patch)
tree5cdb2e8981ae20d0170e847968d9c5c00b5018b4
parent0c589c63f84eab63f3d105ece6a4997f48ba208f (diff)
downloadphp-openid-8fc29714c0d7ebe235eaf9fcd3402bbda4d3c31d.zip
php-openid-8fc29714c0d7ebe235eaf9fcd3402bbda4d3c31d.tar.gz
php-openid-8fc29714c0d7ebe235eaf9fcd3402bbda4d3c31d.tar.bz2
[project @ Use math library to create integer larger than max int]
-rw-r--r--Tests/Net/OpenID/CryptUtil.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/Tests/Net/OpenID/CryptUtil.php b/Tests/Net/OpenID/CryptUtil.php
index 98dbe06..733579e 100644
--- a/Tests/Net/OpenID/CryptUtil.php
+++ b/Tests/Net/OpenID/CryptUtil.php
@@ -62,10 +62,15 @@ class Tests_Net_OpenID_CryptUtil extends PHPUnit_TestCase {
$this->assertFalse(is_float($b));
$this->assertFalse($b == $a);
+ $n = $lib->init(Net_OpenID_CryptUtil::maxint());
+ $one = $lib->init(1);
+ $n = $lib->add($n, 1);
+
// Make sure that we can generate random numbers that are
// larger than platform int size
- Net_OpenID_CryptUtil::randrange(
- $lib->init(Net_OpenID_CryptUtil::maxint() + 1));
+ $result = Net_OpenID_CryptUtil::randrange($n);
+
+ // What can we say about the result?
}
function test_strxor()