Help for this page

Select Code to Download


  1. or download this
    use Test::More tests => 100;
    
    ...
    
    lives_ok { $o->bar(42) } 'can set foo';
    is( $o->bar, 42, 'foo set' );
    
  2. or download this
    use Test::More 'no_plan';
    
    ...
        lives_ok { $o->bar(42) } 'can set foo';
        is( $o->bar, 42, 'foo set' );
    }
    
  3. or download this
    SKIP: {
        ok(1);
    ...
        skip "skip tests", 1 if $bar;
        ok(3);
    };
    
  4. or download this
    SKIP: {
        my $b = Test::Block->expecting(4);
    ...
        ok(3);
        ok(4);
    };
    
  5. or download this
    plan tests => @foo + keys %bar + (3*$ni);
    
  6. or download this
    {
        my $b = Test::Block->expecting(scalar(@foo));
    ...
        my $b = Test::Block->expecting(3 * $ni);
        # $ni tests
    }