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 17072-bc6ca01) Lines: 91424 104277 87.7 %
Date: 2014-11-17 Functions: 8107 9077 89.3 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 53673 72810 73.7 %

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
57.4%57.4%
57.4 % 826 / 1439 64.5 % 71 / 110 40.8 % 327 / 802
language
68.0%68.0%
68.0 % 7592 / 11168 72.0 % 786 / 1092 53.8 % 4191 / 7795
headers
88.9%88.9%
88.9 % 1159 / 1303 87.6 % 480 / 548 82.5 % 510 / 618
kernel/gmp
90.9%90.9%
90.9 % 748 / 823 98.3 % 57 / 58 81.2 % 522 / 643
modules
91.2%91.2%
91.2 % 10232 / 11214 97.1 % 595 / 613 75.4 % 5740 / 7609
basemath
91.4%91.4%
91.4 % 67390 / 73751 93.6 % 5726 / 6116 77.6 % 39592 / 51042
kernel/none
91.7%91.7%
91.7 % 3163 / 3449 84.3 % 354 / 420 74.7 % 2669 / 3574

Generated by: LCOV version 1.9