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 16741-1378b1c) Lines: 87933 100705 87.3 %
Date: 2014-08-17 Functions: 7861 8770 89.6 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 52330 71319 73.4 %

Directory Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage Branches Sort by branch coverage
gp
32.2%32.2%
32.2 % 584 / 1811 34.1 % 59 / 173 22.5 % 310 / 1377
mt
16.8%16.8%
16.8 % 36 / 214 44.4 % 16 / 36 7.3 % 6 / 82
graph
63.4%63.4%
63.4 % 912 / 1439 76.4 % 84 / 110 47.1 % 378 / 802
language
71.8%71.8%
71.8 % 7348 / 10230 77.9 % 770 / 988 57.3 % 4093 / 7145
kernel/none
91.4%91.4%
91.4 % 3130 / 3426 83.9 % 350 / 417 74.4 % 2640 / 3550
headers
88.5%88.5%
88.5 % 1142 / 1291 87.3 % 473 / 542 81.7 % 496 / 607
basemath
90.9%90.9%
90.9 % 63943 / 70333 93.6 % 5468 / 5841 77.2 % 38269 / 49576
modules
90.6%90.6%
90.6 % 10090 / 11138 96.5 % 584 / 605 74.5 % 5616 / 7537
kernel/gmp
90.9%90.9%
90.9 % 748 / 823 98.3 % 57 / 58 81.2 % 522 / 643

Generated by: LCOV version 1.9