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 16937-4bd9b4e) Lines: 88617 101804 87.0 %
Date: 2014-10-24 Functions: 7892 8887 88.8 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 52599 71890 73.2 %

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
62.8%62.8%
62.8 % 904 / 1439 73.6 % 81 / 110 46.9 % 376 / 802
language
67.8%67.8%
67.8 % 7574 / 11168 71.7 % 782 / 1090 53.8 % 4203 / 7819
headers
88.5%88.5%
88.5 % 1150 / 1300 87.2 % 475 / 545 82.0 % 505 / 616
basemath
90.6%90.6%
90.6 % 64597 / 71283 93.0 % 5516 / 5931 76.9 % 38499 / 50092
modules
90.7%90.7%
90.7 % 10177 / 11216 96.3 % 591 / 614 74.9 % 5707 / 7621
kernel/gmp
90.9%90.9%
90.9 % 748 / 823 98.3 % 57 / 58 81.2 % 522 / 643
kernel/none
91.5%91.5%
91.5 % 3153 / 3445 84.0 % 352 / 419 74.6 % 2665 / 3570

Generated by: LCOV version 1.9