Skip to content

Term::Table::CellStack::add_cell() and add_cells() not tested or documented #15

@jkeenan

Description

@jkeenan

I have begun to study the Test2-Suite and Term-Table distributions on CPAN in anticipation of their being brought into the Perl core distribution. I ran Term-Table through Devel::Cover and got this coverage report:

$ cover -summary -coverage "statement,branch,condition,subroutine"
Reading database from /home/jkeenan/gitwork/zzzothers/Term-Table/cover_db


-------------------------------- ------ ------ ------ ------ ------
File                               stmt   bran   cond    sub  total
-------------------------------- ------ ------ ------ ------ ------
blib/lib/Term/Table.pm             91.9   80.4   71.8   92.3   85.0
blib/lib/Term/Table/Cell.pm       100.0   70.0   76.9  100.0   91.6
blib/lib/Term/Table/CellStack.pm   89.0  100.0   50.0   87.5   88.0
blib/lib/Term/Table/HashBase.pm    90.8   82.3   47.0   93.3   84.3
blib/lib/Term/Table/LineBreak.pm   98.2   85.0   88.8   90.0   93.7
blib/lib/Term/Table/Util.pm       100.0   75.0    n/a  100.0   97.1
Total                              93.6   80.9   70.3   93.6   87.6
-------------------------------- ------ ------ ------ ------ ------


HTML output written to /home/jkeenan/gitwork/zzzothers/Term-Table/cover_db/coverage.html
done.

In my experience increasing the coverage of subroutines in the code base by the test suite is a good place to start. Looking at Term::Table::CellStack, I observed that the add_cell and add_cells methods are not exercised by the test suite. Investigating further, I found that, other than the declarations of these two subroutines within lib/Term/Table/CellStack.pm, they are not documented or even mentioned anywhere inside the Term-Table repository -- or the Test2-Suite repository, for that matter.

$ ack 'add_cells?' Test2-Suite/ Term-Table/
Term-Table/lib/Term/Table/CellStack.pm
16:sub add_cell {
21:sub add_cells {

It would be good to have these subroutines documented and exercised by the test suite prior to Term-Table's distribution with Perl core. Please let me know if I can be of assistance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions