Annotation of embedaddon/php/ext/spl/tests/spl_heap_isempty.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: SPL: Test of isEmpty for SPL Max Heap
3: --CREDITS--
4: Rohan Abraham (rohanabrahams@gmail.com)
5: TestFest London May 2009
6: --FILE--
7: <?php
8: $h = new SplMaxHeap();
9: echo "Checking a new heap is empty: ";
10: var_dump($h->isEmpty())."\n";
11: $h->insert(2);
12: echo "Checking after insert: ";
13: var_dump($h->isEmpty())."\n";
14: $h->extract();
15: echo "Checking after extract: ";
16: var_dump($h->isEmpty())."\n";
17: ?>
18: --EXPECT--
19: Checking a new heap is empty: bool(true)
20: Checking after insert: bool(false)
21: Checking after extract: bool(true)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>