File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / spl / tests / spl_heap_isempty.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:01 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--TEST--
SPL: Test of isEmpty for SPL Max Heap
--CREDITS--
Rohan Abraham (rohanabrahams@gmail.com)
TestFest London May 2009
--FILE--
<?php
  $h = new SplMaxHeap();
  echo "Checking a new heap is empty: ";
  var_dump($h->isEmpty())."\n";
  $h->insert(2);
  echo "Checking after insert: ";
  var_dump($h->isEmpty())."\n";
  $h->extract();
  echo "Checking after extract: ";
  var_dump($h->isEmpty())."\n";
?>
--EXPECT--
Checking a new heap is empty: bool(true)
Checking after insert: bool(false)
Checking after extract: bool(true)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>