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-bordeaux.fr machine (x86_64 architecture), and agregate them in the final report:

The target is to exceed 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 - language Hit Total Coverage
Test: PARI/GP v2.12.0 lcov report (development 23008-54b2e2f01) Lines: 9821 12946 75.9 %
Date: 2018-09-20 05:37:46 Functions: 1014 1259 80.5 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 %

Filename Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage
anal.c
92.4%92.4%
92.4 % 606 / 656 95.1 % 97 / 102
compile.c
90.2%90.2%
90.2 % 1349 / 1496 98.8 % 79 / 80
default.c
61.6%61.6%
61.6 % 342 / 555 59.7 % 40 / 67
es.c
59.4%59.4%
59.4 % 1591 / 2678 68.4 % 212 / 310
eval.c
73.8%73.8%
73.8 % 1026 / 1391 82.7 % 91 / 110
forprime.c
84.7%84.7%
84.7 % 382 / 451 86.8 % 33 / 38
gplib.c
48.8%48.8%
48.8 % 427 / 875 61.3 % 57 / 93
hash.c
81.1%81.1%
81.1 % 142 / 175 89.7 % 26 / 29
init.c
70.1%70.1%
70.1 % 836 / 1193 75.6 % 102 / 135
intnum.c
97.4%97.4%
97.4 % 1399 / 1437 99.1 % 114 / 115
members.c
98.7%98.7%
98.7 % 300 / 304 100.0 % 54 / 54
parse.c
69.2%69.2%
69.2 % 173 / 250 100.0 % 5 / 5
parse.y
95.3%95.3%
95.3 % 123 / 129 - 0 / 0
parsec.h
97.1%97.1%
97.1 % 100 / 103 100.0 % 17 / 17
readline.c
0.0%
0.0 % 0 / 185 0.0 % 0 / 17
sumiter.c
96.0%96.0%
96.0 % 1025 / 1068 100.0 % 87 / 87

Generated by: LCOV version 1.13