From: Scott MacVicar Date: Wed, 17 Jun 2009 13:15:39 +0000 (+0000) Subject: Update test to test a few more cases and another for calling prev() on a blank DLL. X-Git-Tag: php-5.4.0alpha1~191^2~3296 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1217eab95042b4d85fbf6baa7f56a559d20800ee;p=php Update test to test a few more cases and another for calling prev() on a blank DLL. --- diff --git a/ext/spl/tests/dllist_010.phpt b/ext/spl/tests/dllist_010.phpt index 685f735d6b..7e389559e2 100644 --- a/ext/spl/tests/dllist_010.phpt +++ b/ext/spl/tests/dllist_010.phpt @@ -10,18 +10,24 @@ $dll->push(4); $dll->rewind(); -echo $dll->current()."\n"; +$dll->prev(); +var_dump($dll->current()); +$dll->rewind(); +var_dump($dll->current()); +$dll->next(); +var_dump($dll->current()); $dll->next(); $dll->next(); -echo $dll->current()."\n"; +var_dump($dll->current()); $dll->prev(); -echo $dll->current()."\n"; +var_dump($dll->current()); ?> ===DONE=== - ---EXPECTF-- -1 -3 -2 +--EXPECT-- +NULL +int(1) +int(2) +int(4) +int(3) ===DONE=== diff --git a/ext/spl/tests/dllist_011.phpt b/ext/spl/tests/dllist_011.phpt new file mode 100644 index 0000000000..b9be872555 --- /dev/null +++ b/ext/spl/tests/dllist_011.phpt @@ -0,0 +1,13 @@ +--TEST-- +SPL: DoublyLinkedList: prev +--FILE-- +rewind(); +$dll->prev(); +var_dump($dll->current()); +?> +===DONE=== +--EXPECT-- +NULL +===DONE===