summaryrefslogtreecommitdiff
path: root/tests/quicktester.inc
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2001-08-08 15:06:09 +0000
committerSVN Migration <svn@php.net>2001-08-08 15:06:09 +0000
commit22909a77ef3489ef6be3c860d0002ea66c4436f0 (patch)
tree480ca7c565161cc36eddc9f8eee073ef10be3019 /tests/quicktester.inc
parent2f6cd308f9a8c53e0ce359603f4746b27bc32356 (diff)
downloadphp-git-PRE_METHOD_DEREFERENCE_PATCH.tar.gz
This commit was manufactured by cvs2svn to create tagPRE_METHOD_DEREFERENCE_PATCH
'PRE_METHOD_DEREFERENCE_PATCH'.
Diffstat (limited to 'tests/quicktester.inc')
-rw-r--r--tests/quicktester.inc35
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/quicktester.inc b/tests/quicktester.inc
deleted file mode 100644
index 08e3c0a40f..0000000000
--- a/tests/quicktester.inc
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
- /*
- Helper for simple tests to check return-value. Usage:
-
- $tests = <<<TESTS
- expected_return_value === expression
- 2 === 1+1
- 4 === 2*2
- FALSE === @ fopen('non_existent_file')
-TESTS;
- include( '../../../(../)tests/quicktester.inc' );
-
- Expect: OK
-
- Remember to NOT put a trailing ; after a line!
-
- */
- error_reporting(E_ALL);
- $tests = explode("\n",$tests);
- $success = TRUE;
- foreach ($tests as $test)
- {
- $res = eval("return ($test);");
- $success = $success && $res;
- if (!$res)
- {
- echo "\nAssert failed:\n";
- echo "$test\n";
- list($left,$right) = explode('===',$test);
- echo "Left: ";var_dump(eval("return ($left );"));
- echo "Right: ";var_dump(eval("return ($right);"));
- }
- }
- if ($success) echo "OK";
-