tests/IntMathTest.php
/**
     * @covers \PhpCommon\IntMath\IntMath::multiply
     *
     * @testdox The multiply() method wraps around the result on overflow
     */
@covers \PhpCommon\IntMath\IntMath::multiply
@testdox The multiply() method wraps around the result on overflow
@covers \ PhpCommon \ IntMath \ IntMath :: multiply @testdox The multiply () method wraps around the result on overflow
public function testMultiplyWrapsAroundOnOverflow()
    {
        $this->assertSame(-2, IntMath::multiply(\PHP_INT_MAX, 2));
        $this->assertSame(-2, IntMath::multiply(2, \PHP_INT_MAX));
        $this->assertSame(2, IntMath::multiply(2, -\PHP_INT_MAX));
        $this->assertSame(2, IntMath::multiply(-2, \PHP_INT_MAX));
        $this->assertSame(\PHP_INT_MAX + -2, IntMath::multiply(\PHP_INT_MAX, 3));
        $this->assertSame(\PHP_INT_MAX + -2, IntMath::multiply(3, \PHP_INT_MAX));
        $this->assertSame(1, IntMath::multiply(\PHP_INT_MAX, \PHP_INT_MAX));
        $this->assertSame(\PHP_INT_MIN, IntMath::multiply(\PHP_INT_MIN, 3));
        $this->assertSame(\PHP_INT_MIN, IntMath::multiply(3, \PHP_INT_MIN));
        $this->assertSame(\PHP_INT_MIN, IntMath::multiply(\PHP_INT_MIN, -3));
        $this->assertSame(\PHP_INT_MIN, IntMath::multiply(-3, \PHP_INT_MIN));
    }
public function testMultiplyWrapsAroundOnOverflow ( ) { $ this -> assertSame ( - 2 , IntMath :: multiply ( \ PHP_INT_MAX , 2 ) ) ; $ this -> assertSame ( - 2 , IntMath :: multiply ( 2 , \ PHP_INT_MAX ) ) ; $ this -> assertSame ( 2 , IntMath :: multiply ( 2 , - \ PHP_INT_MAX ) ) ; $ this -> assertSame ( 2 , IntMath :: multiply ( - 2 , \ PHP_INT_MAX ) ) ; $ this -> assertSame ( \ PHP_INT_MAX + - 2 , IntMath :: multiply ( \ PHP_INT_MAX , 3 ) ) ; $ this -> assertSame ( \ PHP_INT_MAX + - 2 , IntMath :: multiply ( 3 , \ PHP_INT_MAX ) ) ; $ this -> assertSame ( 1 , IntMath :: multiply ( \ PHP_INT_MAX , \ PHP_INT_MAX ) ) ; $ this -> assertSame ( \ PHP_INT_MIN , IntMath :: multiply ( \ PHP_INT_MIN , 3 ) ) ; $ this -> assertSame ( \ PHP_INT_MIN , IntMath :: multiply ( 3 , \ PHP_INT_MIN ) ) ; $ this -> assertSame ( \ PHP_INT_MIN , IntMath :: multiply ( \ PHP_INT_MIN , - 3 ) ) ; $ this -> assertSame ( \ PHP_INT_MIN , IntMath :: multiply ( - 3 , \ PHP_INT_MIN ) ) ; }
@covers \PhpCommon\IntMath\IntMath::multiply
 @testdox The multiply() method wraps around the result on overflow
@covers \ PhpCommon \ IntMath \ IntMath :: multiply @testdox The multiply () method wraps around the result on overflow