mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2024-12-12 09:09:45 +01:00
40 lines
665 B
PHP
40 lines
665 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Psl\Tests\Math;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Psl\Math;
|
|
|
|
class ExpTest extends TestCase
|
|
{
|
|
/**
|
|
* @dataProvider provideData
|
|
*/
|
|
public function testExp(float $expected, float $number): void
|
|
{
|
|
self::assertSame($expected, Math\exp($number));
|
|
}
|
|
|
|
public function provideData(): array
|
|
{
|
|
return [
|
|
[
|
|
162754.79141900392,
|
|
12.0,
|
|
],
|
|
|
|
[
|
|
298.8674009670603,
|
|
5.7,
|
|
],
|
|
|
|
[
|
|
Math\INFINITY,
|
|
1000000,
|
|
]
|
|
];
|
|
}
|
|
}
|