コード例 #1
0
ファイル: ModuleTest.php プロジェクト: bluesnowman/fphp-saber
 /**
  * This method tests the "eq" method.
  *
  * @dataProvider data_eq
  */
 public function test_eq(array $provided, array $expected)
 {
     $p0 = IObject\Module::eq(IObject\Type::box($provided[0]), IObject\Type::box($provided[1]));
     $e0 = $expected[0];
     $this->assertInstanceOf('\\Saber\\Data\\IBool\\Type', $p0);
     $this->assertSame($e0, $p0->unbox());
 }
コード例 #2
0
ファイル: Module.php プロジェクト: bluesnowman/fphp-saber
 /**
  * This method evaluates whether the left operand is NOT equal to the right operand.
  *
  * @access public
  * @static
  * @param IObject\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(IObject\Type $x, Core\Type $y) : IBool\Type
 {
     // !=
     return IBool\Module::not(IObject\Module::eq($x, $y));
 }