From 26cee27ef3c4ac8f1a2ba7cd7580f41319451c1d Mon Sep 17 00:00:00 2001 From: Fernando Brito Date: Fri, 7 Jan 2011 15:02:06 -0300 Subject: [PATCH] [t] Add 'todo' param to 'dies_ok, throws_like' --- runtime/parrot/library/Test/More.pir | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/runtime/parrot/library/Test/More.pir b/runtime/parrot/library/Test/More.pir index c9999055a2..b4dfe79549 100644 --- a/runtime/parrot/library/Test/More.pir +++ b/runtime/parrot/library/Test/More.pir @@ -1125,6 +1125,7 @@ Passes a test if the PIR code throws any exception, fails a test otherwise. .sub dies_ok .param string target .param string description :optional + .param string todo :named("todo") :optional .local pmc test get_hll_global test, [ 'Test'; 'More' ], '_test' @@ -1145,9 +1146,14 @@ Passes a test if the PIR code throws any exception, fails a test otherwise. pop_eh # if it doesn't throw an exception fail + if todo goto todo_l test.'ok'( 0, description ) - test.'diag'('no error thrown') + goto after_todo_l + todo_l: + test.'todo'( 0, description, todo ) + after_todo_l: + test.'diag'('no error thrown') goto done handler: @@ -1231,6 +1237,7 @@ an exception that matches the pattern, fails the test otherwise. .param string target .param string pattern .param string description :optional + .param string todo :named("todo") :optional .local pmc test get_hll_global test, [ 'Test'; 'More' ], '_test' @@ -1251,9 +1258,14 @@ an exception that matches the pattern, fails the test otherwise. pop_eh # if it doesn't throw an exception, fail + if todo goto todo_l test.'ok'( 0, description ) - test.'diag'( 'no error thrown' ) + goto after_todo_l + todo_l: + test.'todo'( 0, description, todo ) + after_todo_l: + test.'diag'('no error thrown') goto done handler: