[svn:parrot] r41096 - trunk/t/pmc
dukeleto at svn.parrot.org
dukeleto at svn.parrot.org
Mon Sep 7 05:27:32 UTC 2009
Author: dukeleto
Date: Mon Sep 7 05:27:31 2009
New Revision: 41096
URL: https://trac.parrot.org/parrot/changeset/41096
Log:
[t] Refactor some namespace pmc tests to use throws_like
Modified:
trunk/t/pmc/namespace.t
Modified: trunk/t/pmc/namespace.t
==============================================================================
--- trunk/t/pmc/namespace.t Mon Sep 7 05:22:27 2009 (r41095)
+++ trunk/t/pmc/namespace.t Mon Sep 7 05:27:31 2009 (r41096)
@@ -192,25 +192,21 @@
ok(0, "Cannot get Sub from NameSpace Foo::Bar")
test4:
- push_eh eh4
+ throws_like( <<'CODE', 'Null\ PMC\ access\ in\ invoke', 'Invoking a non-existent sub')
+.sub main
$P0 = get_global ["Foo"], "SUB_THAT_DOES_NOT_EXIST"
$P0()
- ok(0, "Found and invoked a non-existant sub")
- goto test5
- eh4:
- # Should we check the exact error message here?
- ok(1, "Cannot invoke a Sub that doesn't exist")
+.end
+CODE
test5:
# this used to behave differently from the previous case.
- push_eh eh5
+ throws_like( <<'CODE', 'Null\ PMC\ access\ in\ invoke', 'Invoking a non-existent sub')
+.sub main
$P0 = get_global ["Foo";"Bar"], "SUB_THAT_DOES_NOT_EXIST"
$P0()
- ok(0, "Found and invoked a non-existant sub")
- goto test6
- eh5:
- # Should we check the exact error message here?
- ok(1, "Cannot invoke a Sub that doesn't exist")
+.end
+CODE
test6:
push_eh eh6
More information about the parrot-commits
mailing list