cvs: php-src /ext/spl/examples recursivedualiterator.inc /ext/spl/examples/tests dualiterator_001.phpt
| From: | Marcus Boerger | Date: | Thu, 25 May 2006 18:15:04 +0000 |
| Subject: | cvs: php-src /ext/spl/examples recursivedualiterator.inc /ext/spl/examples/tests dualiterator_001.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-38427@lists.php.net to get a copy of this message | ||
helly Thu May 25 18:15:04 2006 UTC
Modified files:
/php-src/ext/spl/examples recursivedualiterator.inc
/php-src/ext/spl/examples/tests dualiterator_001.phpt
Log:
- Make recursive part and identical part work correct
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/examples/recursivedualiterator.inc?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/spl/examples/recursivedualiterator.inc
diff -u php-src/ext/spl/examples/recursivedualiterator.inc:1.1
php-src/ext/spl/examples/recursivedualiterator.inc:1.2
--- php-src/ext/spl/examples/recursivedualiterator.inc:1.1 Thu May 25 17:44:59 2006
+++ php-src/ext/spl/examples/recursivedualiterator.inc Thu May 25 18:15:03 2006
@@ -47,7 +47,7 @@
$this->ref = new ReflectionClass($this);
}
return $this->ref->newInstance(
- $this->getLHS()->current(), $this->getRHS()->current(), $this->flags);
+ $this->getLHS()->getChildren(), $this->getRHS()->getChildren(),
$this->getFlags());
}
/** @return whether both inner iterators are valid, have same hasChildren()
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/examples/tests/dualiterator_001.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/spl/examples/tests/dualiterator_001.phpt
diff -u php-src/ext/spl/examples/tests/dualiterator_001.phpt:1.1
php-src/ext/spl/examples/tests/dualiterator_001.phpt:1.2
--- php-src/ext/spl/examples/tests/dualiterator_001.phpt:1.1 Thu May 25 17:44:59 2006
+++ php-src/ext/spl/examples/tests/dualiterator_001.phpt Thu May 25 18:15:04 2006
@@ -26,6 +26,10 @@
test(array(1,array(21,22),3), array(1,array(21,22,23),3));
test(array(1,array(21,22),3), array(1,array(21,22,3)));
test(array(1,array(21,22),3), array(1,array(21),array(22),3));
+test(array(1,2,3), array(1,"2",3), false);
+test(array(1,2,3), array(1,"2",3), true);
+test(array(1,array(21,22),3), array(1,array(21,"22"),3), false);
+test(array(1,array(21,22),3), array(1,array(21,"22"),3), true);
?>
===DONE===
@@ -36,4 +40,8 @@
bool(false)
bool(false)
bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
===DONE===