Remove comment on loop-detection (now handled in IRSpy.pm)
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Test.pm
1 # $Id: Test.pm,v 1.3 2006-07-21 11:49:27 mike Exp $
2
3 package ZOOM::IRSpy::Test;
4
5 use 5.008;
6 use strict;
7 use warnings;
8
9 =head1 NAME
10
11 ZOOM::IRSpy::Test - base class for tests in IRSpy
12
13 =head1 SYNOPSIS
14
15  ## To follow
16
17 =head1 DESCRIPTION
18
19 I<## To follow>
20
21 =cut
22
23 sub new {
24     my $class = shift();
25     my($irspy) = @_;
26
27     return bless {
28         irspy => $irspy,
29     }, $class;
30 }
31
32
33 sub irspy {
34     my $this = shift();
35     return $this->{irspy};
36 }
37
38
39 sub run {
40     my $this = shift();
41     die "can't run the base-class test";
42 }
43
44 sub run_tests {
45     my $this = shift();
46     my @tname = @_;
47
48     my $res = 0;
49     foreach my $tname (@tname) {
50         my $sub = $this->irspy()->_run_test($tname);
51         $res = $sub if $sub > $res;
52     }
53
54     return $res;
55 }
56
57
58 =head1 SEE ALSO
59
60 ZOOM::IRSpy
61
62 =head1 AUTHOR
63
64 Mike Taylor, E<lt>mike@indexdata.comE<gt>
65
66 =head1 COPYRIGHT AND LICENSE
67
68 Copyright (C) 2006 by Index Data ApS.
69
70 This library is free software; you can redistribute it and/or modify
71 it under the same terms as Perl itself, either Perl version 5.8.7 or,
72 at your option, any later version of Perl 5 you may have available.
73
74 =cut
75
76 1;