Skip to content
Browse files

regresion test for dd7ff4e

  • Loading branch information...
1 parent dd7ff4e commit 6f2c9b1ade816db8cd467fb6c6610320c34bbd65 @NotFound NotFound committed Dec 13, 2010
Showing with 17 additions and 1 deletion.
  1. +17 −1 t/pmc/namespace.t
View
18 t/pmc/namespace.t
@@ -55,7 +55,7 @@ Although NameSpace.'export_to'() is used in test_more.pir.
.sub main :main
.include 'test_more.pir'
- plan(74)
+ plan(75)
create_namespace_pmc()
verify_namespace_type()
@@ -599,6 +599,22 @@ CODE
.end
CODE
+ errormsg = "can't handle argument of type"
+ description = "export_to() invalid 'what' type"
+ throws_substring(<<"CODE", errormsg, description)
+ .sub 'test' :main
+ .local pmc nsa, nsb, ar
+
+ # To trigger the condition we need something of an unexpected
+ # type which elements vtable function does not return 0
+ ar = new ['String']
+ ar = 'boo'
+ nsa = get_namespace
+ nsb = get_namespace ['Foo']
+ nsb.'export_to'(nsa, ar)
+ .end
+CODE
+
errormsg = "exporting default object set not yet implemented"
description = 'export_to() with null exports default object set !!!UNSPECIFIED!!!'
throws_substring(<<'CODE', errormsg, description)

0 comments on commit 6f2c9b1

Please sign in to comment.
Something went wrong with that request. Please try again.