コード例 #1
0
ファイル: MathTest.php プロジェクト: ThorstenSuckow/conjoon
 public function testScale()
 {
     Zend_Locale_Math_PhpMath::disable();
     $this->assertTrue(Zend_Locale_Math_PhpMath::Scale(3));
     try {
         $this->assertTrue(Zend_Locale_Math_PhpMath::Scale(10));
         $this->fail("exception expected");
     } catch (Zend_Locale_Math_Exception $e) {
         // success
     }
     $this->assertEquals(1, Zend_Locale_Math_PhpMath::Comp(10.5556, 10.4444));
     $this->assertTrue(Zend_Locale_Math_PhpMath::Scale(0));
     $this->assertEquals(0, Zend_Locale_Math_PhpMath::Comp(10.5556, 10.4444));
 }