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.1 lcov report (development 24817-60c8736d58) Lines: 10360 13438 77.1 %
Date: 2019-12-14 05:53:14 Functions: 1059 1318 80.3 %
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
89.4%89.4%
89.4 % 572 / 640 90.8 % 89 / 98
compile.c
90.2%90.2%
90.2 % 1385 / 1536 97.6 % 82 / 84
default.c
61.9%61.9%
61.9 % 346 / 559 61.2 % 41 / 67
es.c
60.0%60.0%
60.0 % 1572 / 2619 64.3 % 196 / 305
eval.c
74.4%74.4%
74.4 % 1113 / 1495 84.5 % 109 / 129
forprime.c
85.5%85.5%
85.5 % 406 / 475 87.2 % 34 / 39
gplib.c
53.3%53.3%
53.3 % 471 / 884 63.8 % 60 / 94
hash.c
87.4%87.4%
87.4 % 152 / 174 96.7 % 29 / 30
init.c
71.1%71.1%
71.1 % 886 / 1247 76.9 % 113 / 147
intnum.c
97.6%97.6%
97.6 % 1432 / 1467 99.2 % 118 / 119
members.c
98.7%98.7%
98.7 % 307 / 311 100.0 % 54 / 54
parse.c
76.9%76.9%
76.9 % 276 / 359 100.0 % 5 / 5
parse.y
93.8%93.8%
93.8 % 106 / 113 - 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
str.c
100.0%
100.0 % 108 / 108 100.0 % 14 / 14
sumiter.c
97.0%97.0%
97.0 % 1128 / 1163 99.0 % 98 / 99

Generated by: LCOV version 1.13