kasei / attean

A Perl Semantic Web Framework
19 stars 10 forks source link

Add tests to improve code coverage. #98

Open kasei opened 8 years ago

kasei commented 8 years ago

Code coverage generated by Devel::Cover with something like this:

perl Makefile.PL && make
HARNESS_PERL_SWITCHES=-MDevel::Cover=+ignore,Test make test
cover # generates cover_db/coverage.html

will reveal many places that code in Attean is not touched by the test suite. I've been trying to improve the "sub" coverage for all files to 100%. Finding a row in the coverage results where the cell in the "sub" column is not "100.0" will reveal places where not all subs are hit by the test suite. Clicking on that cell in the results table will reveal which subs (and their line numbers in the file) are of interest. Try to add a new test case that tests the expected results of the function.

Some examples of recent additions: