/** * This method tests the "nvl" method. */ public function test_nvl() { $x = IDouble\Type::one(); $y = IDouble\Type::zero(); $z = IDouble\Module::nvl($x, $y); $this->assertInstanceOf('\\Saber\\Data\\IDouble\\Type', $z); $this->assertSame(1.0, $z->unbox()); $z = IDouble\Module::nvl(null, $x); $this->assertInstanceOf('\\Saber\\Data\\IDouble\\Type', $z); $this->assertSame(1.0, $z->unbox()); $z = IDouble\Module::nvl(null, null); $this->assertInstanceOf('\\Saber\\Data\\IDouble\\Type', $z); $this->assertSame(0.0, $z->unbox()); }