File: TestAssertionCodeRef.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 (15 lines) | stat: -rw-r--r-- 365 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package TestAssertionCodeRef;
use strict;

use base qw(Test::Unit::TestCase);

sub test_case_to_string { my $self = shift; $self->assert(sub { my
$self = shift; $self->to_string eq shift; }, $self,
"test_noy_to_string(" . ref($self) . ")"); }

sub test_with_a_regex {
    my $self = shift;
    $self->assert(qr/foo/, 'foo');
    $self->assert(qr/bar/, 'foo');
}
1;