|
| testAdd ($a, $b, $result, $scale) |
| addData More...
|
|
| testSub ($a, $b, $result, $scale) |
| subData More...
|
|
| testMul ($a, $b, $result, $scale) |
| mulData More...
|
|
| testDiv ($a, $b, $result, $scale) |
| divData More...
|
|
| testSqrt ($a, $result, $scale) |
| sqrtData More...
|
|
| testPow ($a, $b, $result, $scale) |
| powData More...
|
|
| testMod ($a, $b, $result) |
| modData More...
|
|
| testEquals ($a, $b, $result, $scale) |
| equalsData More...
|
|
| testCalculation ($formula, $result, $scale) |
| calcData More...
|
|
| testDivisionsByZero () |
|
| testModuloByZero () |
|
| addData () |
|
| subData () |
|
| mulData () |
|
| divData () |
|
| modData () |
|
| sqrtData () |
|
| powData () |
|
| equalsData () |
|
| calcData () |
|
◆ addData()
ilMathBaseAdapterTest::addData |
( |
| ) |
|
◆ calcData()
ilMathBaseAdapterTest::calcData |
( |
| ) |
|
Definition at line 216 of file ilMathBaseAdapterTest.php.
219 [
'3+5',
'8', self::DEFAULT_SCALE],
220 [
'-3+5',
'2', self::DEFAULT_SCALE],
221 [
'3*6+5',
'23', self::DEFAULT_SCALE],
222 [
'10/2',
'5', self::DEFAULT_SCALE],
223 [
'13/60',
'0.2166666666666', 13],
224 [
'(-(-8)-sqrt((-8)^2-4*(7)))/(2)',
'1', self::DEFAULT_SCALE],
225 [
'(-(-8)+sqrt((-8)^2-4*(7)))/(2)',
'7', self::DEFAULT_SCALE],
226 [
'(-(-41)-sqrt((-41)^2-4*(1)*(5)))/(2*(1))',
'0.122', 3],
227 [
'(-(-41)+sqrt((-41)^2-4*(1)*(5)))/(2*(1))',
'40.877', 3],
228 [
'4^2-2*4+0.5*-16',
'0', self::DEFAULT_SCALE],
229 [
'-2^2-2*-2+0.5*-16',
'-8', self::DEFAULT_SCALE]
◆ divData()
ilMathBaseAdapterTest::divData |
( |
| ) |
|
- Returns
- array
Definition at line 161 of file ilMathBaseAdapterTest.php.
164 [
'1',
'2',
'0.5', self::DEFAULT_SCALE],
165 [
'',
'2',
'0', self::DEFAULT_SCALE],
◆ equalsData()
ilMathBaseAdapterTest::equalsData |
( |
| ) |
|
◆ modData()
ilMathBaseAdapterTest::modData |
( |
| ) |
|
◆ mulData()
ilMathBaseAdapterTest::mulData |
( |
| ) |
|
- Returns
- array
Definition at line 150 of file ilMathBaseAdapterTest.php.
153 [
'1',
'2',
'2', self::DEFAULT_SCALE],
154 [
'1',
'',
'0', self::DEFAULT_SCALE]
◆ powData()
ilMathBaseAdapterTest::powData |
( |
| ) |
|
◆ setUp()
ilMathBaseAdapterTest::setUp |
( |
| ) |
|
|
protected |
◆ sqrtData()
ilMathBaseAdapterTest::sqrtData |
( |
| ) |
|
- Returns
- array
Definition at line 182 of file ilMathBaseAdapterTest.php.
185 [
'9',
'3', self::DEFAULT_SCALE],
186 [
'4294967296',
'65536', self::DEFAULT_SCALE],
187 [
'12345678901234567890',
'3513641828', null],
188 [
'12345678901234567890',
'3513641828.82', 2]
◆ subData()
ilMathBaseAdapterTest::subData |
( |
| ) |
|
◆ testAdd()
ilMathBaseAdapterTest::testAdd |
( |
|
$a, |
|
|
|
$b, |
|
|
|
$result, |
|
|
|
$scale |
|
) |
| |
◆ testCalculation()
ilMathBaseAdapterTest::testCalculation |
( |
|
$formula, |
|
|
|
$result, |
|
|
|
$scale |
|
) |
| |
◆ testDiv()
ilMathBaseAdapterTest::testDiv |
( |
|
$a, |
|
|
|
$b, |
|
|
|
$result, |
|
|
|
$scale |
|
) |
| |
◆ testDivisionsByZero()
ilMathBaseAdapterTest::testDivisionsByZero |
( |
| ) |
|
Definition at line 110 of file ilMathBaseAdapterTest.php.
112 $this->setExpectedException(ilMathDivisionByZeroException::class);
114 $this->mathAdapter->div(1, 0);
◆ testEquals()
ilMathBaseAdapterTest::testEquals |
( |
|
$a, |
|
|
|
$b, |
|
|
|
$result, |
|
|
|
$scale |
|
) |
| |
◆ testMod()
ilMathBaseAdapterTest::testMod |
( |
|
$a, |
|
|
|
$b, |
|
|
|
$result |
|
) |
| |
◆ testModuloByZero()
ilMathBaseAdapterTest::testModuloByZero |
( |
| ) |
|
Definition at line 120 of file ilMathBaseAdapterTest.php.
122 $this->setExpectedException(ilMathDivisionByZeroException::class);
124 $this->mathAdapter->mod(1, 0);
◆ testMul()
ilMathBaseAdapterTest::testMul |
( |
|
$a, |
|
|
|
$b, |
|
|
|
$result, |
|
|
|
$scale |
|
) |
| |
◆ testPow()
ilMathBaseAdapterTest::testPow |
( |
|
$a, |
|
|
|
$b, |
|
|
|
$result, |
|
|
|
$scale |
|
) |
| |
◆ testSqrt()
ilMathBaseAdapterTest::testSqrt |
( |
|
$a, |
|
|
|
$result, |
|
|
|
$scale |
|
) |
| |
◆ testSub()
ilMathBaseAdapterTest::testSub |
( |
|
$a, |
|
|
|
$b, |
|
|
|
$result, |
|
|
|
$scale |
|
) |
| |
◆ $evalMath
ilMathBaseAdapterTest::$evalMath |
|
protected |
◆ $mathAdapter
ilMathBaseAdapterTest::$mathAdapter |
|
protected |
◆ DEFAULT_SCALE
const ilMathBaseAdapterTest::DEFAULT_SCALE = 50 |
The documentation for this class was generated from the following file: