File: FilteredSuite.pm

package info (click to toggle)
libtest-unit-perl 0.28-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,312 kB
  • sloc: perl: 4,299; makefile: 5
file content (36 lines) | stat: -rw-r--r-- 772 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package FilteredSuite;

use base 'Test::Unit::TestCase';

sub filter {{
    token_filtering_via_method_list => [
        qw/test_filtered_method1 test_filtered_method2/
    ],
    token_filtering_via_sub => sub {
        my ($method) = @_;
        return 1 if $method =~ /method3$/;
    },
    broken_token => 'nonsense',
}}

sub test_filtered_method1 {
    my $self = shift;
    die "test_filtered_method1 should get filtered via method list";
}

sub test_filtered_method2 {
    my $self = shift;
    die "test_filtered_method2 should get filtered via method list";
}

sub test_filtered_method3 {
    my $self = shift;
    die "test_filtered_method3 should get filtered via sub";
}

sub test_unfiltered_method1 {
    my $self = shift;
    $self->assert('trooooo');
}

1;