RTB/t/1.t

filter: Statementstmt 100% 24 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod n/a totaltotal 96.7% 30 / 31 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Acme/RTB.pm ↑ Summary
1 # Before `make install' is performed this script should be runnable with
2 # `make test'. After `make install' it should work as `perl 1.t'
3  
4 #########################
5  
6 # change 'tests => 1' to 'tests => last_test_to_print';
7  
8 1 ▶use Test::More tests => 4;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶BEGIN { use_ok('Acme::RTB') };
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 #########################
12  
13 # Insert your test code below, the Test::More module is use()ed here so read
14 # its man page ( perldoc Test::More ) for help writing this test script.
15  
16 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 1 my $rand;
20 1 $rand.=chr(rand(25)+65) for 1..10;
21 1 my $robot = Acme::RTB->new({ Name => 'Anarion PerlBot 1.0',
22 Colour => 'ff0000 ff0000',
23 Log => "/tmp/$$-$rand.log"} );
24  
25 1 ok( $robot );
26 1 ok( $robot->modify_action( Radar => \&my_radar ) );
27 1 ok( $robot->RotateAmount(7, 0.5, 2) );
28  
29 0 ▶sub my_radar { }
Subroutine my_radar: not called CC=1 SCAR=0.0
30 1 unlink("/tmp/$$-$rand.log");
« blib/lib/Acme/RTB.pm ↑ Summary