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