]> granicus.if.org Git - php/commitdiff
Removed bizarre tests for disgusting bugs which have kept annoying us.
authorMoriyoshi Koizumi <moriyoshi@php.net>
Mon, 28 Apr 2003 18:51:47 +0000 (18:51 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Mon, 28 Apr 2003 18:51:47 +0000 (18:51 +0000)
 - bug #22367 (http://bugs.php.net/22367)
 - bug #22510 (http://bugs.php.net/22510)
 - bug #22592 (http://bugs.php.net/22592)

tests/lang/bug22367.phpt [deleted file]
tests/lang/bug22510.phpt [deleted file]
tests/lang/bug22592.phpt [deleted file]

diff --git a/tests/lang/bug22367.phpt b/tests/lang/bug22367.phpt
deleted file mode 100644 (file)
index fea45bf..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
---TEST--
-Bug #22367 (weird zval allocation problem)
---FILE--
-<?php
-class foo
-{
-       var $test = array(0, 1, 2, 3, 4); 
-
-       function a($arg) {
-               var_dump(array_key_exists($arg, $this->test));
-               return $this->test[$arg];
-       }
-
-       function b() {
-               @$this->c();
-
-               $zero = $this->test[0];
-               $one = $this->test[1];
-               $two = $this->test[2];
-               $three = $this->test[3];
-               $four = $this->test[4];
-               return array($zero, $one, $two, $three, $four);
-       }
-
-       function c() {
-               return $this->a($this->d());
-       }
-
-       function d() {}
-}
-
-class bar extends foo
-{
-       var $i = 0;
-       var $idx;
-
-       function bar($idx) {
-               $this->idx = $idx;
-       }
-
-       function &a($arg){
-               return parent::a($arg);
-       }
-       function d(){
-               return $this->idx;
-       }
-}
-
-$a = new bar(5);
-var_dump($a->idx);
-@$a->c();
-$b = $a->b();
-var_dump($b);
-var_dump($a->test);
-
-$a = new bar(2);
-var_dump($a->idx);
-@$a->c();
-$b = $a->b();
-var_dump($b);
-var_dump($a->test);
-
-?>
---EXPECT--
-int(5)
-bool(false)
-bool(false)
-array(5) {
-  [0]=>
-  int(0)
-  [1]=>
-  int(1)
-  [2]=>
-  int(2)
-  [3]=>
-  int(3)
-  [4]=>
-  int(4)
-}
-array(5) {
-  [0]=>
-  int(0)
-  [1]=>
-  int(1)
-  [2]=>
-  int(2)
-  [3]=>
-  int(3)
-  [4]=>
-  int(4)
-}
-int(2)
-bool(true)
-bool(true)
-array(5) {
-  [0]=>
-  int(0)
-  [1]=>
-  int(1)
-  [2]=>
-  int(2)
-  [3]=>
-  int(3)
-  [4]=>
-  int(4)
-}
-array(5) {
-  [0]=>
-  int(0)
-  [1]=>
-  int(1)
-  [2]=>
-  int(2)
-  [3]=>
-  int(3)
-  [4]=>
-  int(4)
-}
diff --git a/tests/lang/bug22510.phpt b/tests/lang/bug22510.phpt
deleted file mode 100644 (file)
index ce5ce01..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
---TEST--
-Bug #22510 (segfault among complex references)
---FILE--
-<?php
-class foo 
-{
-       var $list = array();
-
-       function finalize() {
-               print __CLASS__."::".__FUNCTION__."\n";
-               $cl = &$this->list;
-       }
-
-       function &method1() {
-               print __CLASS__."::".__FUNCTION__."\n";
-               return @$this->foo;
-       }
-
-       function &method2() {
-               print __CLASS__."::".__FUNCTION__."\n";
-               return $this->foo;
-       }
-
-       function method3() {
-               print __CLASS__."::".__FUNCTION__."\n";
-               return @$this->foo;
-       }
-}
-
-class bar 
-{
-       function run1() {
-               print __CLASS__."::".__FUNCTION__."\n";
-               $this->instance = new foo();
-               $this->instance->method1($this);
-               $this->instance->method1($this);
-       }
-
-       function run2() {
-               print __CLASS__."::".__FUNCTION__."\n";
-               $this->instance = new foo();
-               $this->instance->method2($this);
-               $this->instance->method2($this);
-       }
-
-       function run3() {
-               print __CLASS__."::".__FUNCTION__."\n";
-               $this->instance = new foo();
-               $this->instance->method3($this);
-               $this->instance->method3($this);
-       }
-}
-
-function ouch(&$bar) {
-       print __FUNCTION__."\n";
-       @$a = $a;
-       $bar->run1();
-}
-
-function ok1(&$bar) {
-       print __FUNCTION__."\n";
-       $bar->run1();
-}
-
-function ok2(&$bar) {
-       print __FUNCTION__."\n";
-       @$a = $a; 
-       $bar->run2();
-}
-
-function ok3(&$bar) {
-       print __FUNCTION__."\n";
-       @$a = $a;
-       $bar->run3();
-}
-
-$bar = &new bar();
-ok1($bar);
-$bar->instance->finalize();
-print "done!\n";
-ok2($bar);
-$bar->instance->finalize();
-print "done!\n";
-ok3($bar);
-$bar->instance->finalize();
-print "done!\n";
-ouch($bar);
-$bar->instance->finalize();
-print "I'm alive!\n";
-?>
---EXPECT--
-ok1
-bar::run1
-foo::method1
-foo::method1
-foo::finalize
-done!
-ok2
-bar::run2
-foo::method2
-foo::method2
-foo::finalize
-done!
-ok3
-bar::run3
-foo::method3
-foo::method3
-foo::finalize
-done!
-ouch
-bar::run1
-foo::method1
-foo::method1
-foo::finalize
-I'm alive!
diff --git a/tests/lang/bug22592.phpt b/tests/lang/bug22592.phpt
deleted file mode 100644 (file)
index e4e68b1..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
---TEST--
-Bug #22592 (cascading assignments to strings with curly braces broken)
---FILE--
-<?php
-function error_hdlr($errno, $errstr) {
-       echo "[$errstr]\n";
-}
-
-set_error_handler('error_hdlr');
-
-$i = 4;
-$s = "string";
-
-$result = "* *-*";
-var_dump($result);
-$result{6} = '*';
-var_dump($result);
-$result{1} = $i;
-var_dump($result);
-$result{3} = $s;
-var_dump($result);
-$result{7} = 0;
-var_dump($result);
-$a = $result{1} = $result{3} = '-';
-var_dump($result);
-$b = $result{3} = $result{5} = $s;
-var_dump($result);
-$c = $result{0} = $result{2} = $result{4} = $i;
-var_dump($result);
-$d = $result{6} = $result{8} = 5;
-var_dump($result);
-$e = $result{1} = $result{6};
-var_dump($result);
-var_dump($a, $b, $c, $d, $e);
-$result{-1} = 'a';
-?>
---EXPECT--
-string(5) "* *-*"
-string(7) "* *-* *"
-string(7) "*4*-* *"
-string(7) "*4*s* *"
-string(8) "*4*s* *0"
-string(8) "*-*-* *0"
-string(8) "*-*s*s*0"
-string(8) "4-4s4s*0"
-string(9) "4-4s4s505"
-string(9) "454s4s505"
-string(1) "-"
-string(6) "string"
-int(4)
-int(5)
-string(1) "5"
-[Illegal string offset:  -1]