From: Ard Biesheuvel Date: Thu, 17 Jan 2013 16:41:58 +0000 (+0100) Subject: Added test cases for ZEND_SIGNED_MULTIPLY_LONG() X-Git-Tag: php-5.6.0alpha1~582^2~27^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=abb12f5d7b82c40bc11eb374130e1607fad76d31;p=php Added test cases for ZEND_SIGNED_MULTIPLY_LONG() Before making changes to the implementation of ZEND_SIGNED_MULTIPLY_LONG(), add some test cases to make sure the various implementations remain equivalent. --- diff --git a/Zend/tests/zend_signed_multiply-32bit.phpt b/Zend/tests/zend_signed_multiply-32bit.phpt new file mode 100644 index 0000000000..0a42bd42d8 --- /dev/null +++ b/Zend/tests/zend_signed_multiply-32bit.phpt @@ -0,0 +1,14 @@ +--TEST-- +Zend signed multiply 32-bit +--SKIPIF-- + 0) print "skip Running on 64-bit target"; ?> +--FILE-- + +--EXPECTF-- +int(-2147450880) +int(2147483646) +float(-2147516415) diff --git a/Zend/tests/zend_signed_multiply-64bit.phpt b/Zend/tests/zend_signed_multiply-64bit.phpt new file mode 100644 index 0000000000..86e5292ff6 --- /dev/null +++ b/Zend/tests/zend_signed_multiply-64bit.phpt @@ -0,0 +1,14 @@ +--TEST-- +Zend signed multiply 64-bit +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +int(-9223372034707292160) +int(9223372036854775806) +float(-9.2233720390023E+18)