Changes between Version 1 and Version 2 of PerlSixTesting

Show
Ignore:
Timestamp:
12/09/08 21:47:01 (6 years ago)
Author:
moritz
Comment:

cleaned up formatting

Legend:

Unmodified
Added
Removed
Modified
  • PerlSixTesting

    v1 v2  
    1616 
    1717=== adverb on operators === 
     18 
     19{{{ 
    1820                $x eq 'foo'     :ok('Test descriptions'); 
    1921                $x == 23        :ok('explicit numeric test'); 
    2022                ?$x             :ok<stuff>      # used to be ok($x, 'stuff'); 
    2123                try { dispatch() } :ok<...>     # used to be lives_Ok { ... }, '...'; 
    22             (it was also proposed to name it :test instead of :ok) 
    23             pros: 
     24}}} 
     25 
     26            (it was also proposed to name it `:test` instead of `:ok`) 
     27 
     28            '''pros:''' 
    2429                * good diagnose of output 
    2530                * force exact comparison semantics 
    2631                * no pollution of namespace 
    27             cons: 
     32            '''cons:''' 
    2833                * have to auto-generate ops with adverbs 
    2934                * more complicated grammar needed 
     
    3237 
    3338=== normal sub calls, like now === 
     39{{{ 
    3440                ok $x eq 'foo', 'description'; 
    3541                dies_ok { ... }, 'description'; 
    36             pros: 
     42}}} 
     43 
     44            '''pros:''' 
    3745                * easier to implement 
    3846                * it's been proven to work out well 
    3947                * visually tests are very easy to spot 
    40             cons: 
     48            '''cons:''' 
    4149                * it's *very* hard to get good diagnostics out of failed tests 
    4250                  (advanced macro fiddling needed)