From: Antony Dovgal Date: Fri, 27 Apr 2007 21:33:02 +0000 (+0000) Subject: add new tests X-Git-Tag: php-5.2.2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=70e6d3d042538cac68f17539bdc337244e92edee;p=php add new tests --- diff --git a/Zend/tests/cast_to_array.phpt b/Zend/tests/cast_to_array.phpt new file mode 100644 index 0000000000..5e351052bb Binary files /dev/null and b/Zend/tests/cast_to_array.phpt differ diff --git a/Zend/tests/cast_to_bool.phpt b/Zend/tests/cast_to_bool.phpt new file mode 100644 index 0000000000..75ab09d1b5 --- /dev/null +++ b/Zend/tests/cast_to_bool.phpt @@ -0,0 +1,53 @@ +--TEST-- +casting different variables to boolean +--FILE-- + +--EXPECTF-- +bool(true) +bool(true) +bool(false) +bool(true) +bool(true) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(true) +Done diff --git a/Zend/tests/cast_to_double.phpt b/Zend/tests/cast_to_double.phpt new file mode 100644 index 0000000000..7afc2708be --- /dev/null +++ b/Zend/tests/cast_to_double.phpt @@ -0,0 +1,55 @@ +--TEST-- +casting different variables to double +--FILE-- + +--EXPECTF-- +float(0) +float(8754456) +float(0) +float(0) +float(9876545) +float(0.1) +float(0) +float(1) +float(0) +float(1) +float(0) +float(%d) + +Notice: Object of class test could not be converted to double in %s on line %d +float(1) +Done diff --git a/Zend/tests/cast_to_int.phpt b/Zend/tests/cast_to_int.phpt new file mode 100644 index 0000000000..28c57ddf63 --- /dev/null +++ b/Zend/tests/cast_to_int.phpt @@ -0,0 +1,55 @@ +--TEST-- +casting different variables to integer +--FILE-- + +--EXPECTF-- +int(0) +int(8754456) +int(0) +int(0) +int(9876545) +int(0) +int(0) +int(1) +int(0) +int(1) +int(0) +int(%d) + +Notice: Object of class test could not be converted to int in %s on line %d +int(1) +Done diff --git a/Zend/tests/cast_to_object.phpt b/Zend/tests/cast_to_object.phpt new file mode 100644 index 0000000000..f8d4878475 Binary files /dev/null and b/Zend/tests/cast_to_object.phpt differ diff --git a/Zend/tests/cast_to_string.phpt b/Zend/tests/cast_to_string.phpt new file mode 100644 index 0000000000..d06daa2e7c Binary files /dev/null and b/Zend/tests/cast_to_string.phpt differ diff --git a/Zend/tests/settype_array.phpt b/Zend/tests/settype_array.phpt new file mode 100644 index 0000000000..5da023205e Binary files /dev/null and b/Zend/tests/settype_array.phpt differ diff --git a/Zend/tests/settype_bool.phpt b/Zend/tests/settype_bool.phpt new file mode 100644 index 0000000000..cf59200b81 --- /dev/null +++ b/Zend/tests/settype_bool.phpt @@ -0,0 +1,53 @@ +--TEST-- +casting different variables to boolean using settype() +--FILE-- + +--EXPECTF-- +bool(true) +bool(true) +bool(false) +bool(true) +bool(true) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(true) +Done diff --git a/Zend/tests/settype_double.phpt b/Zend/tests/settype_double.phpt new file mode 100644 index 0000000000..931a3d9dff --- /dev/null +++ b/Zend/tests/settype_double.phpt @@ -0,0 +1,55 @@ +--TEST-- +casting different variables to double using settype() +--FILE-- + +--EXPECTF-- +float(0) +float(8754456) +float(0) +float(0) +float(9876545) +float(0.1) +float(0) +float(1) +float(0) +float(1) +float(0) +float(%d) + +Notice: Object of class test could not be converted to double in %s on line %d +float(1) +Done diff --git a/Zend/tests/settype_int.phpt b/Zend/tests/settype_int.phpt new file mode 100644 index 0000000000..7b96cd594e --- /dev/null +++ b/Zend/tests/settype_int.phpt @@ -0,0 +1,55 @@ +--TEST-- +casting different variables to integer using settype() +--FILE-- + +--EXPECTF-- +int(0) +int(8754456) +int(0) +int(0) +int(9876545) +int(0) +int(0) +int(1) +int(0) +int(1) +int(0) +int(%d) + +Notice: Object of class test could not be converted to int in %s on line %d +int(1) +Done diff --git a/Zend/tests/settype_null.phpt b/Zend/tests/settype_null.phpt new file mode 100644 index 0000000000..0abf2f9810 --- /dev/null +++ b/Zend/tests/settype_null.phpt @@ -0,0 +1,53 @@ +--TEST-- +casting different variables to null using settype() +--FILE-- + +--EXPECTF-- +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +Done diff --git a/Zend/tests/settype_object.phpt b/Zend/tests/settype_object.phpt new file mode 100644 index 0000000000..d619dce7e3 Binary files /dev/null and b/Zend/tests/settype_object.phpt differ diff --git a/Zend/tests/settype_resource.phpt b/Zend/tests/settype_resource.phpt new file mode 100644 index 0000000000..cc8cde34fd Binary files /dev/null and b/Zend/tests/settype_resource.phpt differ diff --git a/Zend/tests/settype_string.phpt b/Zend/tests/settype_string.phpt new file mode 100644 index 0000000000..d3beb54cb7 Binary files /dev/null and b/Zend/tests/settype_string.phpt differ