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 25685-2ac6d95b9c) Lines: 11668 14616 79.8 %
Date: 2020-08-06 06:06:08 Functions: 1153 1363 84.6 %
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.2%92.2%
92.2 % 612 / 664 93.9 % 92 / 98
compile.c
90.1%90.1%
90.1 % 1591 / 1765 97.7 % 86 / 88
default.c
61.6%61.6%
61.6 % 349 / 567 61.2 % 41 / 67
es.c
74.2%74.2%
74.2 % 2034 / 2741 82.1 % 252 / 307
eval.c
70.0%70.0%
70.0 % 1257 / 1795 77.2 % 115 / 149
forprime.c
84.4%84.4%
84.4 % 407 / 482 87.2 % 34 / 39
gplib.c
53.7%53.7%
53.7 % 493 / 918 63.8 % 60 / 94
hash.c
87.4%87.4%
87.4 % 160 / 183 96.8 % 30 / 31
init.c
76.9%76.9%
76.9 % 1101 / 1431 82.4 % 131 / 159
intnum.c
97.6%97.6%
97.6 % 1478 / 1514 99.2 % 121 / 122
members.c
98.8%98.8%
98.8 % 320 / 324 100.0 % 54 / 54
parse.c
75.2%75.2%
75.2 % 392 / 521 100.0 % 5 / 5
parse.y
94.0%94.0%
94.0 % 110 / 117 - 0 / 0
parsec.h
95.1%95.1%
95.1 % 98 / 103 100.0 % 17 / 17
readline.c
0.0%
0.0 % 0 / 186 0.0 % 0 / 17
str.c
100.0%
100.0 % 108 / 108 100.0 % 14 / 14
sumiter.c
96.7%96.7%
96.7 % 1158 / 1197 99.0 % 101 / 102

Generated by: LCOV version 1.13