1use strict; 2use warnings; 3 4use lib 't/lib'; 5 6use Test::Tester tests => 6; 7 8use SmallTest; 9 10use MyTest; 11 12{ 13 my ($prem, @results) = run_tests( 14 sub { MyTest::ok(1, "run pass")} 15 ); 16 17 is_eq($results[0]->{name}, "run pass"); 18 is_num($results[0]->{ok}, 1); 19} 20 21{ 22 my ($prem, @results) = run_tests( 23 sub { MyTest::ok(0, "run fail")} 24 ); 25 26 is_eq($results[0]->{name}, "run fail"); 27 is_num($results[0]->{ok}, 0); 28} 29 30is_eq(ref(SmallTest::getTest()), "Test::Tester::Delegate"); 31 32is_eq( 33 SmallTest::getTest()->can('ok'), 34 Test::Builder->can('ok'), 35 "Delegate->can() returns the sub from the inner object", 36); 37