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 23499-f2b23893a) Lines: 10099 13166 76.7 %
Date: 2019-01-22 05:42:35 Functions: 1041 1287 80.9 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 %

Filename Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage
readline.c
0.0%
0.0 % 0 / 185 0.0 % 0 / 17
default.c
61.6%61.6%
61.6 % 342 / 555 59.7 % 40 / 67
gplib.c
48.7%48.7%
48.7 % 427 / 877 61.3 % 57 / 93
es.c
61.4%61.4%
61.4 % 1606 / 2617 67.9 % 205 / 302
init.c
69.4%69.4%
69.4 % 858 / 1236 75.4 % 107 / 142
eval.c
74.0%74.0%
74.0 % 1060 / 1432 84.2 % 101 / 120
forprime.c
84.7%84.7%
84.7 % 382 / 451 86.8 % 33 / 38
str.c
97.1%97.1%
97.1 % 101 / 104 92.9 % 13 / 14
anal.c
92.1%92.1%
92.1 % 584 / 634 94.8 % 91 / 96
hash.c
87.0%87.0%
87.0 % 147 / 169 96.4 % 27 / 28
compile.c
90.1%90.1%
90.1 % 1376 / 1527 98.8 % 82 / 83
sumiter.c
96.7%96.7%
96.7 % 1083 / 1120 98.9 % 91 / 92
intnum.c
97.6%97.6%
97.6 % 1437 / 1473 99.2 % 118 / 119
parse.y
95.3%95.3%
95.3 % 123 / 129 - 0 / 0
parse.c
69.2%69.2%
69.2 % 173 / 250 100.0 % 5 / 5
parsec.h
97.1%97.1%
97.1 % 100 / 103 100.0 % 17 / 17
members.c
98.7%98.7%
98.7 % 300 / 304 100.0 % 54 / 54

Generated by: LCOV version 1.13