Changes between Version 2 and Version 3 of ConvertTestsToParrot

Show
Ignore:
Timestamp:
11/05/09 07:15:14 (5 years ago)
Author:
bubaflub
Comment:

Test that check errors can use dies_ok(), throws_like() and throws_substring()

Legend:

Unmodified
Added
Removed
Modified
  • ConvertTestsToParrot

    v2 v3  
    8080Here is a brief list of some potential stumbling blocks and ways around them: 
    8181 
    82  * There are a number of tests which confirm proper error reporting. This can be done in PIR in two ways. The simplest method is to create an exception handler and check the exception message. 
     82 * There are a number of tests which confirm proper error reporting. This can be done in PIR in three ways. The simplest way is to use dies_ok(), throws_like() or throws_substring(). 
     83 
     84 * You can also create an exception handler and check the exception message. 
    8385 
    8486{{{ 
     
    110112}}} 
    111113 
    112 Alternatively, you can create a EventHandler PMC and check for the appropriate error type. See t/pmc/ro.t for an example. This method may be preferable 
     114Finally, you can create a EventHandler PMC and check for the appropriate error type. See t/pmc/ro.t for an example. This method may be preferable 
    113115 
    114116 * Some tests create new classes and add methods to those namespaces. In a consolidated file you will need to make sure the new class names don't collide (you'll probably find a number of Foo and Bar classes), and you will need to make sure you return to the root namespace after the test completes.