diff options
4 files changed, 41 insertions, 1 deletions
diff --git a/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt b/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt index e345036ae9..e13fc3bc1b 100644 --- a/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt +++ b/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt @@ -3,6 +3,7 @@ Test << operator : various numbers as strings --SKIPIF-- <?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); +if ((65<<65)==0) die("skip this test is for Intel only"); ?> --FILE-- <?php @@ -20,7 +21,6 @@ foreach ($strVals as $strVal) { var_dump(bin2hex($strVal<<$otherVal)); } } - ?> ===DONE=== diff --git a/tests/lang/operators/bitwiseShiftLeft_variationStr2.phpt b/tests/lang/operators/bitwiseShiftLeft_variationStr2.phpt new file mode 100644 index 0000000000..09949c56b0 --- /dev/null +++ b/tests/lang/operators/bitwiseShiftLeft_variationStr2.phpt @@ -0,0 +1,18 @@ +--TEST-- +Test << operator : numbers as strings, simple +--FILE-- +<?php + +error_reporting(E_ERROR); + +var_dump("12" << "0"); +var_dump("34" << "1"); +var_dump("56" << "2"); + +?> +===DONE=== +--EXPECT-- +int(12) +int(68) +int(224) +===DONE=== diff --git a/tests/lang/operators/bitwiseShiftRight_variationStr.phpt b/tests/lang/operators/bitwiseShiftRight_variationStr.phpt index ebc34da821..ad53fea9d1 100644 --- a/tests/lang/operators/bitwiseShiftRight_variationStr.phpt +++ b/tests/lang/operators/bitwiseShiftRight_variationStr.phpt @@ -1,5 +1,9 @@ --TEST-- Test >> operator : various numbers as strings +--SKIPIF-- +<?php +if ((65<<65)==0) die("skip this test is for Intel only"); +?> --FILE-- <?php diff --git a/tests/lang/operators/bitwiseShiftRight_variationStr2.phpt b/tests/lang/operators/bitwiseShiftRight_variationStr2.phpt new file mode 100644 index 0000000000..db90e1b338 --- /dev/null +++ b/tests/lang/operators/bitwiseShiftRight_variationStr2.phpt @@ -0,0 +1,18 @@ +--TEST-- +Test >> operator : numbers as strings, simple +--FILE-- +<?php + +error_reporting(E_ERROR); + +var_dump("12" >> "0"); +var_dump("34" >> "1"); +var_dump("56" >> "2"); + +?> +===DONE=== +--EXPECT-- +int(12) +int(17) +int(14) +===DONE=== |