diff options
author | Andrea Faulds <ajf@ajf.me> | 2014-08-01 17:01:17 +0100 |
---|---|---|
committer | Andrea Faulds <ajf@ajf.me> | 2014-08-01 17:01:17 +0100 |
commit | fe894c2154e6b013f0d0b29ca660ad719fd1affe (patch) | |
tree | e0947ca15c18ff2d740c94548cbaedf96d67fb18 | |
parent | a2bbc6f985570a031c38c1c1205bc78786e83518 (diff) | |
download | php-git-fe894c2154e6b013f0d0b29ca660ad719fd1affe.tar.gz |
PHP_INT_MIN and _MAX tests
-rw-r--r-- | tests/lang/constants/PHP_INT_32bit.phpt | 17 | ||||
-rw-r--r-- | tests/lang/constants/PHP_INT_64bit.phpt | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/lang/constants/PHP_INT_32bit.phpt b/tests/lang/constants/PHP_INT_32bit.phpt new file mode 100644 index 0000000000..0c85d9719b --- /dev/null +++ b/tests/lang/constants/PHP_INT_32bit.phpt @@ -0,0 +1,17 @@ +--TEST-- +Test PHP_INT_MIN, PHP_INT_MAX and PHP_INT_SIZE (32-bit) +--SKIPIF-- +<?php if (PHP_INT_SIZE !== 4) + die("skip this test is for 32-bit platforms only"); ?> +--FILE-- +<?php + +var_dump(PHP_INT_MIN); +var_dump(PHP_INT_MAX); +var_dump(PHP_INT_SIZE); + +?> +--EXPECT-- +int(-2147483648) +int(2147483647) +int(4)
\ No newline at end of file diff --git a/tests/lang/constants/PHP_INT_64bit.phpt b/tests/lang/constants/PHP_INT_64bit.phpt new file mode 100644 index 0000000000..4b7da3a3e9 --- /dev/null +++ b/tests/lang/constants/PHP_INT_64bit.phpt @@ -0,0 +1,17 @@ +--TEST-- +Test PHP_INT_MIN, PHP_INT_MAX and PHP_INT_SIZE (64-bit) +--SKIPIF-- +<?php if (PHP_INT_SIZE !== 8) + die("skip this test is for 64-bit platforms only"); ?> +--FILE-- +<?php + +var_dump(PHP_INT_MIN); +var_dump(PHP_INT_MAX); +var_dump(PHP_INT_SIZE); + +?> +--EXPECT-- +int(-9223372036854775808) +int(9223372036854775807) +int(8)
\ No newline at end of file |