mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-09 15:20:58 +00:00
[constant-trickery] Add extra test cases for BCMath and GMP.
This commit is contained in:
parent
2ad6f71002
commit
b83ca10246
15
tests/Math/BigInteger/BCMathTest.php
Normal file
15
tests/Math/BigInteger/BCMathTest.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @author Andreas Fischer <bantu@phpbb.com>
|
||||||
|
* @copyright MMXIII Andreas Fischer
|
||||||
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Math_BigInteger_BCMathTest extends Math_BigInteger_TestCase
|
||||||
|
{
|
||||||
|
static public function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
self::ensureModeConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_BCMATH);
|
||||||
|
parent::setUpBeforeClass();
|
||||||
|
}
|
||||||
|
}
|
@ -1,11 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* @author Andreas Fischer <bantu@phpbb.com>
|
|
||||||
* @copyright MMXIII Andreas Fischer
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
class Math_BigInteger_BigIntegerTest extends Math_BigInteger_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
15
tests/Math/BigInteger/GMPTest.php
Normal file
15
tests/Math/BigInteger/GMPTest.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @author Andreas Fischer <bantu@phpbb.com>
|
||||||
|
* @copyright MMXIII Andreas Fischer
|
||||||
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Math_BigInteger_GMPTest extends Math_BigInteger_TestCase
|
||||||
|
{
|
||||||
|
static public function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
self::ensureModeConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_GMP);
|
||||||
|
parent::setUpBeforeClass();
|
||||||
|
}
|
||||||
|
}
|
15
tests/Math/BigInteger/InternalTest.php
Normal file
15
tests/Math/BigInteger/InternalTest.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @author Andreas Fischer <bantu@phpbb.com>
|
||||||
|
* @copyright MMXIII Andreas Fischer
|
||||||
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Math_BigInteger_InternalTest extends Math_BigInteger_TestCase
|
||||||
|
{
|
||||||
|
static public function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
self::ensureModeConstant('MATH_BIGINTEGER_MODE', MATH_BIGINTEGER_MODE_INTERNAL);
|
||||||
|
parent::setUpBeforeClass();
|
||||||
|
}
|
||||||
|
}
|
@ -5,6 +5,8 @@
|
|||||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once 'Math/BigInteger.php';
|
||||||
|
|
||||||
abstract class Math_BigInteger_TestCase extends PhpseclibTestCase
|
abstract class Math_BigInteger_TestCase extends PhpseclibTestCase
|
||||||
{
|
{
|
||||||
public function getInstance($x = 0, $base = 10)
|
public function getInstance($x = 0, $base = 10)
|
||||||
|
Loading…
Reference in New Issue
Block a user