File: num_tests.t

package info (click to toggle)
libtest-class-perl 0.35-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 476 kB
  • ctags: 102
  • sloc: perl: 1,668; makefile: 2
file content (22 lines) | stat: -rwxr-xr-x 376 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /usr/bin/perl -T

use strict;
use warnings;

package Foo;
use Test::More;
use base qw(Test::Class);

sub test_num_tests : Test(no_plan) {
	my $self = shift;
	is($self->num_tests, 'no_plan', "num_tests access okay");
	$self->num_tests(2);
	is($self->num_tests, 2, "num_tests set okay");
};


package main;
use Test::More tests => 4;

Foo->new->runtests;
Foo->new->runtests;