Skip to content

Commit

Permalink
Okay, not even going to bother.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-scott committed Oct 15, 2015
1 parent 03e615d commit 667f430
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions tests/unit/RandomIntTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,4 @@ public function testOutput()
$this->assertTrue($integers[7] >= $half_neg_max && $integers[7] <= PHP_INT_MAX);
$this->assertTrue($integers[8] >= 0 && $integers[8] <= 255);
}

public function testFailureCases()
{
// Machine epsilons make this insignificant with +1 or - 1:
$x = (float) 999999999999999999999999999999999999999999999999999999;
$y = (float) -999999999999999999999999999999999999999999999999999999;

try {
$integer = random_int(0, $x);
$this->assertTrue(false);
} catch (Error $ex) {
$this->assertTrue($ex instanceof Exception);
}

try {
$integer = random_int($y, $x);
$this->assertTrue(false);
} catch (Error $ex) {
$this->assertTrue($ex instanceof Exception);
}
}
}

0 comments on commit 667f430

Please sign in to comment.