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 16375-9f41ae0) Lines: 84776 97147 87.3 %
Date: 2014-04-19 Functions: 7534 8411 89.6 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 50947 69554 73.2 %

Directory Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage Branches Sort by branch coverage
basemath
91.0%91.0%
91.0 % 60950 / 66990 93.8 % 5164 / 5505 77.0 % 36863 / 47863
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
headers
88.3%88.3%
88.3 % 1128 / 1278 86.8 % 468 / 539 81.7 % 491 / 601
kernel/gmp
91.0%91.0%
91.0 % 746 / 820 98.3 % 57 / 58 81.5 % 524 / 643
kernel/none
91.0%91.0%
91.0 % 3067 / 3372 83.6 % 346 / 414 75.7 % 2752 / 3634
language
72.1%72.1%
72.1 % 7295 / 10114 78.2 % 762 / 975 57.3 % 4034 / 7043
modules
90.5%90.5%
90.5 % 10060 / 11110 96.5 % 578 / 599 74.4 % 5591 / 7515
mt
16.3%16.3%
16.3 % 36 / 221 44.4 % 16 / 36 7.0 % 6 / 86

Generated by: LCOV version 1.9