예제 #1
0
 /**
  * This method tests the "or" method.
  *
  * @dataProvider data_or
  */
 public function test_or(array $provided, array $expected)
 {
     $p0 = ILinkedList\Type::make($provided[0], '\\Saber\\Data\\IBool\\Type');
     $r0 = ILinkedList\Module::or_($p0);
     $e0 = $expected[0];
     $this->assertInstanceOf('\\Saber\\Data\\IBool\\Type', $r0);
     $this->assertSame($e0, $r0->unbox());
 }
예제 #2
0
 /**
  * This method tests the "toString" method.
  *
  * @dataProvider data_toString
  */
 public function test_toString(array $provided, array $expected)
 {
     $this->markTestIncomplete();
     $p0 = ILinkedList\Type::make($provided[0])->toString();
     $e0 = $expected[0];
     $this->assertInstanceOf('\\Saber\\Data\\IString\\Type', $p0);
     $this->assertSame($e0, $p0->unbox());
 }
예제 #3
0
 /**
  * This method returns a value as a boxed object.  A value is typically a PHP typed
  * primitive or object.  It is considered type-safe.
  *
  * @access public
  * @static
  * @param mixed ...$xs                                      the value(s) to be boxed
  * @return ILinkedList\Type                                 the boxed object
  */
 public static function make2(...$xs) : ILinkedList\Type
 {
     return ILinkedList\Type::make($xs);
 }
예제 #4
0
 /**
  * This method tests the "toLinkedList" method.
  *
  * @dataProvider data_toLinkedList
  */
 public function test_toLinkedList(array $provided, array $expected)
 {
     $p0 = ILinkedList\Module::toLinkedList(ILinkedList\Type::make($provided[0], '\\Saber\\Data\\IInt32\\Type'));
     $e0 = $expected[0];
     $this->assertInstanceOf('\\Saber\\Data\\ILinkedList\\Type', $p0);
     $this->assertSame($e0, $p0->unbox(1));
 }