ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMathTest Class Reference
+ Inheritance diagram for ilMathTest:
+ Collaboration diagram for ilMathTest:

Public Member Functions

 testGcd ($a, $b, $result)
 gcdData More...
 
 gcdData ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

 $eval_math
 

Detailed Description

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 8 of file ilMathTest.php.

Member Function Documentation

◆ gcdData()

ilMathTest::gcdData ( )
Returns
array

Definition at line 36 of file ilMathTest.php.

37  {
38  return [
39  ['1254', '5298', '6'],
40  ['41414124', '41414124', '41414124']
41  ];
42  }

◆ setUp()

ilMathTest::setUp ( )
protected

Definition at line 18 of file ilMathTest.php.

19  {
20  require_once 'Services/Math/classes/class.ilMath.php';
21  require_once 'Services/Math/classes/class.EvalMath.php';
22  $this->eval_math = new EvalMath();
23  }

◆ testGcd()

ilMathTest::testGcd (   $a,
  $b,
  $result 
)

gcdData

Definition at line 28 of file ilMathTest.php.

References $result, and ilMath\getGreatestCommonDivisor().

29  {
30  $this->assertEquals($result, ilMath::getGreatestCommonDivisor($a, $b));
31  }
$result
static getGreatestCommonDivisor($a, $b)
+ Here is the call graph for this function:

Field Documentation

◆ $eval_math

ilMathTest::$eval_math
protected

Definition at line 13 of file ilMathTest.php.


The documentation for this class was generated from the following file: