summaryrefslogtreecommitdiff
path: root/Zend/tests/zend_signed_multiply-32bit.phpt
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2013-01-17 17:41:58 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2013-01-17 17:41:58 +0100
commitabb12f5d7b82c40bc11eb374130e1607fad76d31 (patch)
treef62cda63069ad5f7dc538cd415407e002154bb73 /Zend/tests/zend_signed_multiply-32bit.phpt
parent979ca537347d8ae064abe7cf385771788cb684bd (diff)
downloadphp-git-abb12f5d7b82c40bc11eb374130e1607fad76d31.tar.gz
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.
Diffstat (limited to 'Zend/tests/zend_signed_multiply-32bit.phpt')
-rw-r--r--Zend/tests/zend_signed_multiply-32bit.phpt14
1 files changed, 14 insertions, 0 deletions
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--
+<? if ((1 << 31) > 0) print "skip Running on 64-bit target"; ?>
+--FILE--
+<?php
+var_dump(0x8000 * -0xffff);
+var_dump(0x8001 * 0xfffe);
+var_dump(0x8001 * -0xffff);
+?>
+--EXPECTF--
+int(-2147450880)
+int(2147483646)
+float(-2147516415)