summaryrefslogtreecommitdiff
path: root/tests/php/phpt/variables/011-value-casting-operators.phpt
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-11-05 10:25:57 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-11-05 10:25:57 +0100
commitaec191bc6cbb83884466800a750ecad0b37e254f (patch)
treef52fe2b9551056580c5c519fb78a3c5600e1034a /tests/php/phpt/variables/011-value-casting-operators.phpt
parentaf530282f530580c1ed7bc184df0a727068275e1 (diff)
remove test framework, it never works, most of the bugs found by the test framework turn out to be caused by errors in the tests instead of errors in the real code, people complain about it all the time, and basically this whole test framework causes more problems than it solves, solves issue #215 and solves issue #221
Diffstat (limited to 'tests/php/phpt/variables/011-value-casting-operators.phpt')
-rw-r--r--tests/php/phpt/variables/011-value-casting-operators.phpt153
1 files changed, 0 insertions, 153 deletions
diff --git a/tests/php/phpt/variables/011-value-casting-operators.phpt b/tests/php/phpt/variables/011-value-casting-operators.phpt
deleted file mode 100644
index 27e92c7..0000000
--- a/tests/php/phpt/variables/011-value-casting-operators.phpt
+++ /dev/null
@@ -1,153 +0,0 @@
---TEST--
-Test Php::Value casting operators (64bit OS only)
---DESCRIPTION--
-The Php::Value class has casting operators to cast the object to almost every thinkable native type.
-
-native_value_casting - repeats the behavior of c++ functions TestVariables\value_casting
-the output of each of these functions should be the same
-
-Skip if the current OS is not 64-bit architecture.
-
---SKIPIF--
-<?php if (!extension_loaded("extension_for_tests") || 'x86_64' != php_uname('m') ) print "skip"; ?>
---FILEEOF--
-<?php
-
-
-function bool2str($b) {
- return $b ? "Yes" : "No";
-}
-function native_value_casting($value) {
- //echo " long:", (int)$value, "\n string:", (string)$value, "\n double:", (double)$value, "\n bool:", bool2str((bool)$value), PHP_EOL;
- echo " long:", (int)$value, "\n string:", (string)$value, "\n bool:", bool2str((bool)$value), PHP_EOL;
-}
-
-
-function out($v) {
- echo 'Test ';
- var_export($v);
- echo ':', PHP_EOL;
- TestVariables\value_casting($v);
- //native_value_casting($v);
- echo PHP_EOL;
-}
-
-out(5555555555555555);
-out("9223372036854775807");
-out(9223372036854775807);
-out(5);
-out(-99999999);
-out("18");
-out("3.14159265359");
-out(3.14159265359);
-out(25/7);
-out(" this is a string ");
-out(" 2-nd string ");
-out("false");
-out(false);
-out("true");
-out(true);
-out(0);
-out("0");
-out(0123); // octal number (equivalent to 83 decimal)
-out(0x1A); // hexadecimal number (equivalent to 26 decimal)
-
-
-
-
-//echo PHP_EOL;
---EXPECT--
-Test 5555555555555555:
- long:5555555555555555
- string:5555555555555555
- bool:Yes
-
-Test '9223372036854775807':
- long:9223372036854775807
- string:9223372036854775807
- bool:Yes
-
-Test 9223372036854775807:
- long:9223372036854775807
- string:9223372036854775807
- bool:Yes
-
-Test 5:
- long:5
- string:5
- bool:Yes
-
-Test -99999999:
- long:-99999999
- string:-99999999
- bool:Yes
-
-Test '18':
- long:18
- string:18
- bool:Yes
-
-Test '3.14159265359':
- long:3
- string:3.14159265359
- bool:Yes
-
-Test 3.14159265359:
- long:3
- string:3.14159265359
- bool:Yes
-
-Test 3.5714285714286:
- long:3
- string:3.5714285714286
- bool:Yes
-
-Test ' this is a string ':
- long:0
- string: this is a string
- bool:Yes
-
-Test ' 2-nd string ':
- long:2
- string: 2-nd string
- bool:Yes
-
-Test 'false':
- long:0
- string:false
- bool:Yes
-
-Test false:
- long:0
- string:
- bool:No
-
-Test 'true':
- long:0
- string:true
- bool:Yes
-
-Test true:
- long:1
- string:1
- bool:Yes
-
-Test 0:
- long:0
- string:0
- bool:No
-
-Test '0':
- long:0
- string:0
- bool:No
-
-Test 83:
- long:83
- string:83
- bool:Yes
-
-Test 26:
- long:26
- string:26
- bool:Yes \ No newline at end of file