示例#1
0
 /**
  * This method tests the "nvl" method.
  */
 public function test_nvl()
 {
     $x = ILinkedList\Type::make(array(1, 2, 3), '\\Saber\\Data\\IInt32\\Type');
     $y = ILinkedList\Type::empty_();
     $z = ILinkedList\Module::nvl($x, $y);
     $this->assertInstanceOf('\\Saber\\Data\\ILinkedList\\Type', $z);
     $this->assertSame(array(1, 2, 3), $z->unbox(1));
     $z = ILinkedList\Module::nvl(null, $x);
     $this->assertInstanceOf('\\Saber\\Data\\ILinkedList\\Type', $z);
     $this->assertSame(array(1, 2, 3), $z->unbox(1));
     $z = ILinkedList\Module::nvl(null, null);
     $this->assertInstanceOf('\\Saber\\Data\\ILinkedList\\Type', $z);
     $this->assertSame(array(), $z->unbox(1));
 }