/** * This method tests the "id" method. * * @dataProvider data_id */ public function test_id(array $provided, array $expected) { $p0 = IInt32\Module::id(IInt32\Type::box($provided[0]), IInt32\Type::box($provided[1])); $e0 = $expected[0]; $this->assertInstanceOf('\\Saber\\Data\\IBool\\Type', $p0); $this->assertSame($e0, $p0->unbox()); }
/** * This method evaluates whether the left operand is NOT identical to the right operand. * * @access public * @static * @param IInt32\Type $x the left operand * @param Core\Type $y the right operand * @return IBool\Type whether the left operand is NOT identical * to the right operand */ public static function ni(IInt32\Type $x, Core\Type $y) : IBool\Type { // !== return IBool\Module::not(IInt32\Module::id($x, $y)); }
/** * This method evaluates whether the left operand is identical to the right operand. * * @access public * @static * @param IRatio\Type $x the left operand * @param Core\Type $y the right operand * @return IBool\Type whether the left operand is identical * to the right operand */ public static function id(IRatio\Type $x, Core\Type $y) : IBool\Type { // === if ($x->__typeOf() === $y->__typeOf()) { return IBool\Module::and_(IInt32\Module::id($x->numerator(), $y->numerator()), IInt32\Module::id($x->denominator(), $y->denomintor())); } return IBool\Type::false(); }