Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Test::More subtest parameters

by choroba (Cardinal)
on Apr 17, 2013 at 12:17 UTC ( [id://1029133]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    for my $method (qw/method1 method2/) {
        subtest "Checking $method" => sub { my_subtest(MyPackage->$method)
    + };
    }
    
  2. or download this
    sub new_test {
        my ($test, $method) = @_;
    ...
    for my $method (qw/method1 method2/) {
        subtest "Checking $method", new_test(\&my_subtest, $method);
    }
    
  3. or download this
    Type of arg 2 to Test::More::subtest must be sub {} (not subroutine en
    +try)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1029133]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-03-19 02:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found