Code coverage tests

This page documents the degree to which the PARI/GP source code is tested by our public test suite, distributed with the source distribution in directory src/test/. This is measured by the gcov utility; we then process gcov output using the lcov frond-end.

We test a few variants depending on Configure flags on the pari.math.u-bordeaux1.fr machine (x86_64 architecture), and agregate them in the final report:

The target is 90% coverage for all mathematical modules (given that branches depending on DEBUGLEVEL or DEBUGMEM are not covered). This script is run to produce the results below.

LCOV - code coverage report
Current view: top level Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 16861-9aeb453) Lines: 88440 101299 87.3 %
Date: 2014-10-08 Functions: 7926 8834 89.7 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 52566 71683 73.3 %

Directory Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage Branches Sort by branch coverage
mt
16.8%16.8%
16.8 % 36 / 214 44.4 % 16 / 36 7.3 % 6 / 82
gp
31.2%31.2%
31.2 % 286 / 917 29.8 % 25 / 84 17.7 % 114 / 645
graph
63.4%63.4%
63.4 % 912 / 1439 76.4 % 84 / 110 47.1 % 378 / 802
language
68.4%68.4%
68.4 % 7645 / 11179 74.4 % 809 / 1088 54.1 % 4256 / 7871
headers
88.5%88.5%
88.5 % 1149 / 1298 87.3 % 475 / 544 82.1 % 504 / 614
modules
90.6%90.6%
90.6 % 10159 / 11208 96.4 % 592 / 614 74.7 % 5693 / 7619
kernel/gmp
90.9%90.9%
90.9 % 748 / 823 98.3 % 57 / 58 81.2 % 522 / 643
basemath
90.9%90.9%
90.9 % 64360 / 70784 93.8 % 5517 / 5883 77.1 % 38437 / 49839
kernel/none
91.5%91.5%
91.5 % 3145 / 3437 84.2 % 351 / 417 74.4 % 2656 / 3568

Generated by: LCOV version 1.9