[svn:parrot] r47744 - trunk/t/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Mon Jun 21 19:04:59 UTC 2010
Author: NotFound
Date: Mon Jun 21 19:04:58 2010
New Revision: 47744
URL: https://trac.parrot.org/parrot/changeset/47744
Log:
more ArrayIterator tests and fix a trailing space
Modified:
trunk/t/pmc/arrayiterator.t
trunk/t/pmc/hashiterator.t
Modified: trunk/t/pmc/arrayiterator.t
==============================================================================
--- trunk/t/pmc/arrayiterator.t Mon Jun 21 18:37:47 2010 (r47743)
+++ trunk/t/pmc/arrayiterator.t Mon Jun 21 19:04:58 2010 (r47744)
@@ -24,7 +24,7 @@
.sub main :main
.include 'test_more.pir'
- plan(22)
+ plan(27)
iterate_forward() # 8 tests
iterate_backward() # 6 tests
@@ -52,6 +52,23 @@
$P0 = shift it
ok(it, "Can shift 1st element")
is($P0, 1, "With expected value")
+
+ $P1 = new ['Integer'], 0
+ $I0 = exists it[$P1]
+ is($I0, 1, "exists_keyed gives expected value")
+
+ $P2 = it[$P1]
+ is($P2, 42, "get_pmc_keyed gives expected value")
+
+ $I0 = it[$P1]
+ is($I0, 42, "get_integer_keyed gives expected value")
+
+ $N0 = it[$P1]
+ is($N0, 42.0, "get_number_keyed gives expected value")
+
+ $S0 = it[$P1]
+ is($S0, '42', "get_string_keyed gives expected value")
+
$P0 = shift it
nok(it, "Iterator is finished after second shift")
is($P0, 42, "2nd element has correct value")
Modified: trunk/t/pmc/hashiterator.t
==============================================================================
--- trunk/t/pmc/hashiterator.t Mon Jun 21 18:37:47 2010 (r47743)
+++ trunk/t/pmc/hashiterator.t Mon Jun 21 19:04:58 2010 (r47744)
@@ -94,7 +94,7 @@
eh.'handle_types'(.EXCEPTION_INVALID_OPERATION)
set_addr eh, catch
push_eh catch
- it = 987 # Arbitrary value, let's hope we never use
+ it = 987 # Arbitrary value, let's hope we never use
i = 0
goto report
catch:
More information about the parrot-commits
mailing list