| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | //  Custom assertion class for handling precision of Complex numbers
 | 
					
						
							|  |  |  | require_once 'custom/complexAssert.php'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | //  Data Provider handler
 | 
					
						
							|  |  |  | require_once 'testDataFileIterator.php'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class EngineeringTest extends PHPUnit_Framework_TestCase | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     public function setUp() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         if (!defined('PHPEXCEL_ROOT')) { | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  |             define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); | 
					
						
							| 
									
										
										
										
											2015-01-23 23:44:32 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         PHPExcel_Calculation_Functions::setCompatibilityMode(PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerBESSELI | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testBESSELI() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELI'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null, 1E-8); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerBESSELI() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/BESSELI.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerBESSELJ | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testBESSELJ() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELJ'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null, 1E-8); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerBESSELJ() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/BESSELJ.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerBESSELK | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testBESSELK() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELK'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null, 1E-8); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerBESSELK() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/BESSELK.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerBESSELY | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testBESSELY() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELY'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null, 1E-8); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerBESSELY() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/BESSELY.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerCOMPLEX | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testCOMPLEX() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','COMPLEX'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerCOMPLEX() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/COMPLEX.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMAGINARY | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMAGINARY() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMAGINARY'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null, 1E-8); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMAGINARY() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMAGINARY.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMREAL | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMREAL() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMREAL'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null, 1E-8); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMREAL() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMREAL.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMABS | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMABS() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMABS'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null, 1E-8); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMABS() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMABS.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMARGUMENT | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMARGUMENT() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMARGUMENT'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null, 1E-8); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMARGUMENT() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMARGUMENT.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMCONJUGATE | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMCONJUGATE() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMCONJUGATE'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $complexAssert = new complexAssert(); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMCONJUGATE() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMCONJUGATE.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMCOS | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMCOS() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMCOS'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $complexAssert = new complexAssert(); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMCOS() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMCOS.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMDIV | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMDIV() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMDIV'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $complexAssert = new complexAssert(); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMDIV() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMDIV.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMEXP | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMEXP() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMEXP'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $complexAssert = new complexAssert(); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMEXP() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMEXP.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMLN | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMLN() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLN'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $complexAssert = new complexAssert(); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMLN() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMLN.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMLOG2 | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMLOG2() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLOG2'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $complexAssert = new complexAssert(); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMLOG2() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMLOG2.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMLOG10 | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMLOG10() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLOG10'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $complexAssert = new complexAssert(); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMLOG10() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMLOG10.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMPOWER | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMPOWER() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMPOWER'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $complexAssert = new complexAssert(); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMPOWER() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMPOWER.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMPRODUCT | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMPRODUCT() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMPRODUCT'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $complexAssert = new complexAssert(); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMPRODUCT() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMPRODUCT.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMSIN | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMSIN() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSIN'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $complexAssert = new complexAssert(); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMSIN() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMSIN.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMSQRT | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMSQRT() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSQRT'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $complexAssert = new complexAssert(); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMSQRT() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMSQRT.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMSUB | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMSUB() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSUB'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $complexAssert = new complexAssert(); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMSUB() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMSUB.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerIMSUM | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testIMSUM() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSUM'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $complexAssert = new complexAssert(); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerIMSUM() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/IMSUM.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerERF | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testERF() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERF'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null, 1E-12); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerERF() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/ERF.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerERFC | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testERFC() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERFC'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null, 1E-12); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerERFC() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/ERFC.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerBIN2DEC | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testBIN2DEC() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTODEC'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerBIN2DEC() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/BIN2DEC.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerBIN2HEX | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testBIN2HEX() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTOHEX'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerBIN2HEX() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/BIN2HEX.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerBIN2OCT | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testBIN2OCT() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTOOCT'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerBIN2OCT() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/BIN2OCT.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerDEC2BIN | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testDEC2BIN() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOBIN'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerDEC2BIN() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/DEC2BIN.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerDEC2HEX | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testDEC2HEX() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOHEX'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerDEC2HEX() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/DEC2HEX.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerDEC2OCT | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testDEC2OCT() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOOCT'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerDEC2OCT() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/DEC2OCT.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerHEX2BIN | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testHEX2BIN() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOBIN'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerHEX2BIN() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/HEX2BIN.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerHEX2DEC | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testHEX2DEC() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTODEC'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerHEX2DEC() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/HEX2DEC.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerHEX2OCT | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testHEX2OCT() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOOCT'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerHEX2OCT() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/HEX2OCT.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerOCT2BIN | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testOCT2BIN() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOBIN'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerOCT2BIN() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/OCT2BIN.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerOCT2DEC | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testOCT2DEC() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTODEC'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerOCT2DEC() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/OCT2DEC.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerOCT2HEX | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testOCT2HEX() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOHEX'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerOCT2HEX() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/OCT2HEX.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerDELTA | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testDELTA() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DELTA'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerDELTA() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/DELTA.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerGESTEP | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testGESTEP() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','GESTEP'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerGESTEP() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/GESTEP.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testGetConversionGroups() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $result = PHPExcel_Calculation_Engineering::getConversionGroups(); | 
					
						
							|  |  |  |         $this->assertInternalType('array', $result); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testGetConversionGroupUnits() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $result = PHPExcel_Calculation_Engineering::getConversionGroupUnits(); | 
					
						
							|  |  |  |         $this->assertInternalType('array', $result); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testGetConversionGroupUnitDetails() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $result = PHPExcel_Calculation_Engineering::getConversionGroupUnitDetails(); | 
					
						
							|  |  |  |         $this->assertInternalType('array', $result); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testGetConversionMultipliers() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $result = PHPExcel_Calculation_Engineering::getConversionMultipliers(); | 
					
						
							|  |  |  |         $this->assertInternalType('array', $result); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @dataProvider providerCONVERTUOM | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |     public function testCONVERTUOM() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $args = func_get_args(); | 
					
						
							|  |  |  |         $expectedResult = array_pop($args); | 
					
						
							| 
									
										
										
										
											2015-05-17 16:34:30 +00:00
										 |  |  |         $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','CONVERTUOM'), $args); | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         $this->assertEquals($expectedResult, $result, null); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     public function providerCONVERTUOM() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 13:00:02 +00:00
										 |  |  |         return new testDataFileIterator('rawTestData/Calculation/Engineering/CONVERTUOM.data'); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-07-31 20:56:11 +00:00
										 |  |  | } |