File: auto.t

package info (click to toggle)
libtest-tester-perl 0.109-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 164 kB
  • ctags: 44
  • sloc: perl: 463; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 464 bytes parent folder | download | duplicates (4)
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
use strict;
use warnings;

use lib 't';

use Test::Tester tests => 5;

use SmallTest;

use MyTest;

{
	my ($prem, @results) = run_tests(
		sub { MyTest::ok(1, "run pass")}
	);

	is_eq($results[0]->{name}, "run pass");
	is_num($results[0]->{ok}, 1);
}

{
	my ($prem, @results) = run_tests(
		sub { MyTest::ok(0, "run fail")}
	);

	is_eq($results[0]->{name}, "run fail");
	is_num($results[0]->{ok}, 0);
}

is_eq(ref(SmallTest::getTest()), "Test::Tester::Delegate");