bug #2931216 Relations settings not updated on config change
[phpmyadmin/madhuracj.git] / test / PMA_pow_test.php
blobe9b9441b567c5efaa0f3f6427a49a4238243f6ef
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * tests for PMA_pow()
6 * @version $Id$
7 * @package phpMyAdmin-test
8 */
10 /**
13 require_once 'PHPUnit/Framework.php';
14 require_once './libraries/common.lib.php';
16 /**
17 * @package phpMyAdmin-test
19 class PMA_pow_test extends PHPUnit_Framework_TestCase
21 public function testIntOverflow()
23 $this->assertEquals('1267650600228229401496703205376',
24 PMA_pow(2, 100));
27 public function testBcpow()
29 if (function_exists('bcpow')) {
30 $this->assertEquals('1267650600228229401496703205376',
31 PMA_pow(2, 100, 'bcpow'));
32 } else {
33 $this->markTestSkipped('function bcpow() does not exist');
37 public function testGmppow()
39 if (function_exists('gmp_pow')) {
40 $this->assertEquals('1267650600228229401496703205376',
41 PMA_pow(2, 100, 'gmp_pow'));
42 } else {
43 $this->markTestSkipped('function gmp_pow() does not exist');
47 public function _testNegativeExp()
49 $this->assertEquals(0.25,
50 PMA_pow(2, -2));
53 public function _testNegativeExpPow()
55 if (function_exists('pow')) {
56 $this->assertEquals(0.25,
57 PMA_pow(2, -2, 'pow'));
58 } else {
59 $this->markTestSkipped('function pow() does not exist');
63 public function _testNegativeExpBcpow()
65 if (function_exists('bcpow')) {
66 $this->assertEquals(0.25,
67 PMA_pow(2, -2, 'bcpow'));
68 } else {
69 $this->markTestSkipped('function bcpow() does not exist');
73 public function _testNegativeExpGmppow()
75 if (function_exists('gmp_pow')) {
76 $this->assertEquals(0.25,
77 PMA_pow(2, -2, 'gmp_pow'));
78 } else {
79 $this->markTestSkipped('function gmp_pow() does not exist');