/** * This method tests the "isNegative" method. * * @dataProvider data_isNegative */ public function test_isNegative(array $provided, array $expected) { $p0 = IFloat\Module::isNegative(IFloat\Type::box($provided[0])); $e0 = $expected[0]; $this->assertInstanceOf('\\Saber\\Data\\IBool\\Type', $p0); $this->assertSame($e0, $p0->unbox()); }
/** * This method tests the "toString" method. * * @dataProvider data_toString */ public function test_toString(array $provided, array $expected) { $p0 = IFloat\Type::box($provided[0])->toString(); $e0 = $expected[0]; $this->assertInstanceOf('\\Saber\\Data\\IString\\Type', $p0); $this->assertSame($e0, $p0->unbox()); }
/** * This method returns the result of subtracting the specified value from this object's * value. * * @access public * @static * @param IFloat\Type $x the left operand * @param IFloat\Type $y the right operand * @return IFloat\Type the result */ public static function subtract(IFloat\Type $x, IFloat\Type $y) : IFloat\Type { return IFloat\Type::box($x->unbox() - $y->unbox()); }