[svn:parrot] r40114 - trunk/t/pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Thu Jul 16 10:56:26 UTC 2009


Author: bacek
Date: Thu Jul 16 10:56:25 2009
New Revision: 40114
URL: https://trac.parrot.org/parrot/changeset/40114

Log:
[cage][t] Add tests for OrderedHashIterator

Added:
   trunk/t/pmc/orderedhashiterator.t

Added: trunk/t/pmc/orderedhashiterator.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/t/pmc/orderedhashiterator.t	Thu Jul 16 10:56:25 2009	(r40114)
@@ -0,0 +1,48 @@
+#!./parrot
+# Copyright (C) 2001-2006, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/pmc/orderedhashiterator.t - Ordered Hash Iterator
+
+=head1 SYNOPSIS
+
+    % prove t/pmc/orderedhashiterator.t
+
+=head1 DESCRIPTION
+
+Do almost nothing test. Main purpose of OrderedHashIterator covered by
+t/pmc/orderedhash.t.
+
+=cut
+
+.sub 'main'
+    .include 'test_more.pir'
+
+    plan(2)
+
+    # Just test that we can't create OrderedHashIterator directly
+    $I0 = 1
+    push_eh fail
+    $P0 = new ['OrderedHashIterator']
+    $I0 = 0
+  fail:
+    pop_eh
+    ok($I0, "Can't create OrderedHashIterator directly")
+
+    $P0 = new ['OrderedHash']
+    $P1 = iter $P0
+    $I0 = isa $P1, 'Iterator'
+    ok($I0, 'OrderedHashIterator has proper type')
+
+
+.end
+
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:


More information about the parrot-commits mailing list