Gitignore
This commit is contained in:
@ -12,14 +12,12 @@ use CodingTests\Prime;
|
||||
#[CoversClass(Prime::class)]
|
||||
final class PrimeTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function testisPrime(): void
|
||||
public function isPandigital(): void
|
||||
{
|
||||
$primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97];
|
||||
for($test=-100;$test<=100;$test++)
|
||||
{
|
||||
for ($test = -100; $test <= 100; $test++) {
|
||||
$ret = Prime::isPrime($test);
|
||||
$this->assertEquals(in_array($test, $primes), $ret, "Testing $test");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user