[constant-trickery] Add extra test cases for BCMath and GMP.

This commit is contained in:
Andreas Fischer 2013-01-12 02:57:21 +01:00
parent 2ad6f71002
commit b83ca10246
5 changed files with 47 additions and 11 deletions

View 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();
}
}

View File

@ -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
{
}

View 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();
}
}

View 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();
}
}

View File

@ -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)