Chemistry-Mol-0.35/t/change_id.t

filter: Statementstmt 100% 17 / 17 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 95.4% 21 / 22 CC 1 SCAR 0.0
CC
1
Cov
95%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Chemistry-Mol-0.35/t/pod.t ↑ Summary Chemistry-File-VRML-0.10/t/vrml.t »
1 1 ▶use Test::More;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 # These tests make sure that if the id of e.g. an atom changes, the containing
4 # object is notified
5  
6 #plan 'no_plan';
7 1 plan tests => 5;
8  
9 1 ▶use Chemistry::File::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 my $mol = Chemistry::Mol->read("t/mol.pl");
12 1 isa_ok( $mol, 'Chemistry::Mol' );
13 1 is( $mol->atoms(1)->id, 'a1', 'id before' );
14 1 ok( $mol->atoms(1) == $mol->by_id('a1'), 'id matches before' );
15  
16 1 $mol->atoms(1)->id('xyz123');
17 1 is( $mol->atoms(1)->id, 'xyz123', 'id after' );
18 1 ▶ok( $mol->atoms(1) == $mol->by_id('xyz123'), 'id matches after' )
Branch: 1 branch
BranchTrueFalseTotal
&ok($mol->atoms(1) == $mol->by_id("xyz123"), "id matches after") or diag(sprintf("got %s, expected %s", $mol->atoms(1), $mol->by_id("xyz123"))) 1 0 1
19 or diag sprintf "got %s, expected %s", $mol->atoms(1), $mol->by_id('xyz123');
« Chemistry-Mol-0.35/t/pod.t ↑ Summary Chemistry-File-VRML-0.10/t/vrml.t »