@@ -23,43 +23,43 @@ public function testAdd()
2323 {
2424 $ result = $ this ->call (
2525 explode (':: ' , __METHOD__ )[1 ],
26- _Long::get (PHP_INT_MAX ),
27- _Long::get (PHP_INT_MAX )
26+ _Long::get (PHP_INT_MAX - 1 ),
27+ _Long::get (1 )
2828 );
2929
30- $ this ->assertEquals ('18446744073709551614 ' , (string ) $ result );
30+ $ this ->assertEquals ('9223372036854775807 ' , (string ) $ result );
3131 }
3232
3333 public function testSub ()
3434 {
3535 $ result = $ this ->call (
3636 explode (':: ' , __METHOD__ )[1 ],
37- _Long::get ((string ) BigInteger::of (PHP_INT_MAX )-> multipliedBy ( 2 ) ),
38- _Long::get (PHP_INT_MAX )
37+ _Long::get ((string ) BigInteger::of (PHP_INT_MAX )),
38+ _Long::get (1 )
3939 );
4040
41- $ this ->assertEquals ('9223372036854775807 ' , (string ) $ result );
41+ $ this ->assertEquals ('9223372036854775806 ' , (string ) $ result );
4242 }
4343
4444 public function testMul ()
4545 {
4646 $ result = $ this ->call (
4747 explode (':: ' , __METHOD__ )[1 ],
48- _Long::get (PHP_INT_MAX ),
48+ _Long::get (2147483647 ),
4949 _Long::get (3 )
5050 );
5151
52- $ this ->assertEquals ('27670116110564327421 ' , (string ) $ result );
52+ $ this ->assertEquals ('6442450941 ' , (string ) $ result );
5353 }
5454
5555 public function testDiv ()
5656 {
5757 $ result = $ this ->call (
5858 explode (':: ' , __METHOD__ )[1 ],
59- _Long::get (( string ) BigInteger:: of ( PHP_INT_MAX )-> multipliedBy ( 2 ) ),
60- _Long::get (2 )
59+ _Long::get (6442450947 ),
60+ _Long::get (2147483649 )
6161 );
6262
63- $ this ->assertEquals ('9223372036854775807 ' , (string ) $ result );
63+ $ this ->assertEquals ('3 ' , (string ) $ result );
6464 }
6565}
0 commit comments