Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jkeenan opened this issue Sep 18, 2023 · 0 comments

Comments

@jkeenan
Copy link
Contributor

jkeenan commented Sep 18, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant