Bitpay\Math\BcEngineTest::testInput PHP Method

testInput() public method

public testInput ( )
    public function testInput()
    {
        $inputs = array(1234, '1234123412341234123412341234123412412341234213412421341342342', '0x1234123412341234123412341234123412412341234213412', -1234, '-1234123412341234123412341234123412412341234213412421341342342', '-0x1234123412341234123412341234123412412341234213412', false, null, 0, '');
        $outputs = array('1234', '1234123412341234123412341234123412412341234213412421341342342', '7141538191659890405914342860980599801397657411485029184530', '-1234', '-1234123412341234123412341234123412412341234213412421341342342', '-7141538191659890405914342860980599801397657411485029184530', '0', '0', '0', '0');
        $math = new BcEngine();
        for ($i = 0, $size = count($inputs); $i < $size; $i++) {
            $this->assertEquals($outputs[$i], $math->input($inputs[$i]));
        }
    }