| 1 | 1 | ▶ | use Test::More tests => 6; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | |||
| 3 | 1 | ▶ | BEGIN { use_ok('Chemistry::File::Dumper') }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 1 | my $mol = Chemistry::Mol->read("t/mol.pl", format => 'dumper'); | |
| 6 | 1 | isa_ok($mol, "Chemistry::Mol", 'read'); | |
| 7 | |||
| 8 | 1 | my $mol_auto = Chemistry::Mol->read("t/mol.pl"); | |
| 9 | 1 | isa_ok($mol, "Chemistry::Mol", 'read (autodetect)'); | |
| 10 | |||
| 11 | 1 | my $s = $mol->print(format=>'dumper'); | |
| 12 | 1 | my $s2 = $mol_auto->print(format=>'dumper'); | |
| 13 | 1 | is($s, $s2, 'dump and compare'); | |
| 14 | |||
| 15 | 1 | $mol->write('t/test1.pl'); | |
| 16 | 1 | my $mol3 = Chemistry::Mol->read("t/test1.pl"); | |
| 17 | 1 | my $s3 = $mol->print(format=>'dumper'); | |
| 18 | |||
| 19 | 1 | is($s, $s3, 'write and read and compare'); | |
| 20 | 1 | is_deeply($mol, $mol3, 'deep compare'); | |
| 21 | 1 | unlink 't/test1.pl'; | |
| 22 | |||