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 25166-03e642fe2b) Lines: 11075 14474 76.5 %
Date: 2020-04-04 06:01:39 Functions: 1077 1349 79.8 %
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.8%89.8%
89.8 % 597 / 665 90.8 % 89 / 98
compile.c
89.3%89.3%
89.3 % 1529 / 1713 97.7 % 84 / 86
default.c
61.7%61.7%
61.7 % 349 / 566 61.2 % 41 / 67
es.c
60.3%60.3%
60.3 % 1645 / 2728 64.3 % 196 / 305
eval.c
69.2%69.2%
69.2 % 1197 / 1729 77.3 % 109 / 141
forprime.c
84.4%84.4%
84.4 % 407 / 482 87.2 % 34 / 39
gplib.c
53.0%53.0%
53.0 % 485 / 915 63.8 % 60 / 94
hash.c
87.0%87.0%
87.0 % 154 / 177 96.7 % 29 / 30
init.c
72.1%72.1%
72.1 % 1036 / 1437 78.0 % 124 / 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
78.0%78.0%
78.0 % 404 / 518 100.0 % 5 / 5
parse.y
94.0%94.0%
94.0 % 110 / 117 - 0 / 0
parsec.h
97.1%97.1%
97.1 % 100 / 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
97.0%97.0%
97.0 % 1156 / 1192 99.0 % 100 / 101

Generated by: LCOV version 1.13