Ejemplo n.º 1
0
 /**
  * This method tests the "isOdd" method.
  *
  * @dataProvider data_isOdd
  */
 public function test_isOdd(array $provided, array $expected)
 {
     $this->markTestIncomplete();
     $p0 = IInteger\Module::isOdd(IInteger\Type::box($provided[0]));
     $e0 = $expected[0];
     $this->assertInstanceOf('\\Saber\\Data\\IBool\\Type', $p0);
     $this->assertSame($e0, $p0->unbox());
 }
Ejemplo n.º 2
0
 /**
  * This method returns the result of subtracting the specified value from this object's
  * value.
  *
  * @access public
  * @static
  * @param IInteger\Type $x                                  the left operand
  * @param IInteger\Type $y                                  the right operand
  * @return IInteger\Type                                    the result
  */
 public static function subtract(IInteger\Type $x, IInteger\Type $y) : IInteger\Type
 {
     return IInteger\Type::box(gmp_strval(gmp_sub($x->unbox(), $y->unbox())));
 }
Ejemplo n.º 3
0
 /**
  * This method tests the "toString" method.
  *
  * @dataProvider data_toString
  */
 public function test_toString(array $provided, array $expected)
 {
     $p0 = IInteger\Type::box($provided[0])->toString();
     $e0 = $expected[0];
     $this->assertInstanceOf('\\Saber\\Data\\IString\\Type', $p0);
     $this->assertSame($e0, $p0->unbox());
 }