File: todo.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 (33 lines) | stat: -rwxr-xr-x 654 bytes parent folder | download | duplicates (2)
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
#! /usr/bin/perl -T

use strict;
use warnings;

package Object;
sub live {undef};


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

sub todo_test : Test  {
	local $TODO = "unimplemented";
	ok(Object->live, "object live");
};

package main;
use Test::Builder::Tester tests => 2;
$ENV{TEST_VERBOSE}=0;

my $filename = sub { return (caller)[1] }->();

test_out( "not ok 1 - object live # TODO unimplemented" );
test_err( "#     Failed (TODO) test ($filename at line 16)" );

test_err( "#   (in Foo->todo_test)" );
Foo->runtests;
test_test("todo tests work");

package Foo;
is( Foo->num_method_tests('todo_test'), 1, 'todo_test should run 1 test' );