From: Moriyoshi Koizumi Date: Mon, 28 Apr 2003 18:51:47 +0000 (+0000) Subject: Removed bizarre tests for disgusting bugs which have kept annoying us. X-Git-Tag: php-4.3.2RC2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7be8abe5415c30041008f0fd713d1870cc91d221;p=php Removed bizarre tests for disgusting bugs which have kept annoying us. - bug #22367 (http://bugs.php.net/22367) - bug #22510 (http://bugs.php.net/22510) - bug #22592 (http://bugs.php.net/22592) --- diff --git a/tests/lang/bug22367.phpt b/tests/lang/bug22367.phpt deleted file mode 100644 index fea45bf4bd..0000000000 --- a/tests/lang/bug22367.phpt +++ /dev/null @@ -1,118 +0,0 @@ ---TEST-- -Bug #22367 (weird zval allocation problem) ---FILE-- -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 index ce5ce01358..0000000000 --- a/tests/lang/bug22510.phpt +++ /dev/null @@ -1,115 +0,0 @@ ---TEST-- -Bug #22510 (segfault among complex references) ---FILE-- -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 index e4e68b1184..0000000000 --- a/tests/lang/bug22592.phpt +++ /dev/null @@ -1,53 +0,0 @@ ---TEST-- -Bug #22592 (cascading assignments to strings with curly braces broken) ---FILE-- - ---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]