Moontoast\Math\BigNumberTest::testCeil PHP Method

testCeil() public method

public testCeil ( )
    public function testCeil()
    {
        $bn1 = new BigNumber('4.3', 1);
        $bn2 = new BigNumber('9.999', 3);
        $bn3 = new BigNumber('-3.14', 2);
        $bn4 = new BigNumber('23.00000000000000999999', 20);
        $bn5 = new BigNumber('23.00000000000001999999', 20);
        $bn6 = new BigNumber('-23.00000000000000999999', 20);
        $bn7 = new BigNumber('-23.00000000000001999999', 20);
        $this->assertSame('5', $bn1->ceil()->getValue());
        $this->assertSame('10', $bn2->ceil()->getValue());
        $this->assertSame('-3', $bn3->ceil()->getValue());
        $this->assertSame('23', $bn4->ceil()->getValue());
        $this->assertSame('24', $bn5->ceil()->getValue());
        $this->assertSame('-23', $bn6->ceil()->getValue());
        $this->assertSame('-23', $bn7->ceil()->getValue());
    }