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 17588-7fd783e) Lines: 95647 107691 88.8 %
Date: 2015-03-04 Functions: 8510 9383 90.7 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 56299 74902 75.2 %

Directory Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage Branches Sort by branch coverage
basemath
91.7%91.7%
91.7 % 68299 / 74445 93.9 % 5797 / 6171 78.2 % 40267 / 51510
gp
30.9%30.9%
30.9 % 272 / 879 28.2 % 22 / 78 16.9 % 103 / 609
graph
65.5%65.5%
65.5 % 937 / 1430 75.7 % 84 / 111 50.3 % 407 / 809
headers
89.2%89.2%
89.2 % 1178 / 1320 88.1 % 489 / 555 83.4 % 524 / 628
kernel/gmp
90.9%90.9%
90.9 % 748 / 823 98.3 % 57 / 58 81.6 % 525 / 643
kernel/none
91.9%91.9%
91.9 % 3171 / 3449 84.5 % 355 / 420 75.1 % 2683 / 3574
language
72.1%72.1%
72.1 % 8114 / 11253 77.7 % 849 / 1093 57.7 % 4521 / 7832
modules
91.9%91.9%
91.9 % 12746 / 13876 96.6 % 832 / 861 78.2 % 7208 / 9215
mt
84.3%84.3%
84.3 % 182 / 216 69.4 % 25 / 36 74.4 % 61 / 82

Generated by: LCOV version 1.9