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 16393-29b9383) Lines: 85393 97838 87.3 %
Date: 2014-04-24 Functions: 7568 8447 89.6 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 51298 69968 73.3 %

Directory Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage Branches Sort by branch coverage
mt
16.3%16.3%
16.3 % 36 / 221 44.4 % 16 / 36 7.0 % 6 / 86
gp
32.3%32.3%
32.3 % 582 / 1803 33.7 % 59 / 175 22.5 % 308 / 1367
graph
63.4%63.4%
63.4 % 912 / 1439 76.4 % 84 / 110 47.1 % 378 / 802
language
71.8%71.8%
71.8 % 7265 / 10118 77.9 % 760 / 975 57.0 % 4019 / 7045
modules
90.5%90.5%
90.5 % 10060 / 11110 96.5 % 578 / 599 74.4 % 5591 / 7515
kernel/none
91.0%91.0%
91.0 % 3067 / 3372 83.6 % 346 / 414 75.8 % 2753 / 3634
basemath
91.0%91.0%
91.0 % 61596 / 67677 93.8 % 5199 / 5541 77.1 % 37228 / 48275
kernel/gmp
91.0%91.0%
91.0 % 746 / 820 98.3 % 57 / 58 81.5 % 524 / 643
headers
88.3%88.3%
88.3 % 1129 / 1278 87.0 % 469 / 539 81.7 % 491 / 601

Generated by: LCOV version 1.9