/**
  * This method tests the "eq" method.
  */
 public function test_eq()
 {
     $x = IBool\Type::true();
     $y = IBool\Type::false();
     $z = IBool\Module::eq($x, $x);
     $this->assertInstanceOf('\\Saber\\Data\\IBool\\Type', $z);
     $this->assertSame(true, $z->unbox());
     $z = IBool\Module::eq($x, $y);
     $this->assertInstanceOf('\\Saber\\Data\\IBool\\Type', $z);
     $this->assertSame(false, $z->unbox());
 }
Exemple #2
0
 /**
  * This method evaluates whether the left operand is NOT equal to the right operand.
  *
  * @access public
  * @static
  * @param IBool\Type $x                                     the left operand
  * @param Core\Type $y                                      the right operand
  * @return IBool\Type                                       whether the left operand is NOT equal
  *                                                          to the right operand
  */
 public static function ne(IBool\Type $x, Core\Type $y) : IBool\Type
 {
     // !=
     return IBool\Module::not(IBool\Module::eq($x, $y));
 }