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 16912-212c0f0) Lines: 88811 101553 87.5 %
Date: 2014-10-20 Functions: 7937 8867 89.5 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 52660 71756 73.4 %

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
30.3%30.3%
30.3 % 278 / 916 26.2 % 22 / 84 18.0 % 116 / 645
graph
63.9%63.9%
63.9 % 920 / 1439 73.6 % 81 / 110 47.0 % 377 / 802
language
71.6%71.6%
71.6 % 7997 / 11167 77.3 % 843 / 1090 56.1 % 4385 / 7819
kernel/none
91.5%91.5%
91.5 % 3152 / 3443 84.0 % 351 / 418 74.7 % 2664 / 3568
modules
90.7%90.7%
90.7 % 10177 / 11216 96.3 % 591 / 614 74.9 % 5707 / 7621
basemath
90.6%90.6%
90.6 % 64354 / 71035 93.1 % 5502 / 5912 76.8 % 38377 / 49960
kernel/gmp
90.9%90.9%
90.9 % 748 / 823 98.3 % 57 / 58 81.2 % 522 / 643
headers
88.4%88.4%
88.4 % 1149 / 1300 87.0 % 474 / 545 82.1 % 506 / 616

Generated by: LCOV version 1.9