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.16.2 lcov report (development 29367-59464ac63f) Lines: 12212 15274 80.0 %
Date: 2024-05-21 08:08:53 Functions: 1200 1411 85.0 %
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 / 186 0.0 % 0 / 17
default.c
63.1%63.1%
63.1 % 373 / 591 62.9 % 44 / 70
gplib.c
56.1%56.1%
56.1 % 568 / 1013 65.7 % 67 / 102
eval.c
68.9%68.9%
68.9 % 1303 / 1890 75.5 % 117 / 155
es.c
73.8%73.8%
73.8 % 2055 / 2784 81.9 % 254 / 310
init.c
78.4%78.4%
78.4 % 1174 / 1497 84.7 % 138 / 163
parse.c
76.8%76.8%
76.8 % 423 / 551 87.5 % 7 / 8
str.c
89.5%89.5%
89.5 % 111 / 124 93.3 % 14 / 15
anal.c
91.8%91.8%
91.8 % 636 / 693 94.1 % 95 / 101
forprime.c
87.5%87.5%
87.5 % 439 / 502 94.7 % 36 / 38
hash.c
87.9%87.9%
87.9 % 167 / 190 96.9 % 31 / 32
compile.c
90.9%90.9%
90.9 % 1605 / 1765 97.8 % 88 / 90
intnum.c
97.0%97.0%
97.0 % 1583 / 1632 99.2 % 132 / 133
parse.y
94.1%94.1%
94.1 % 111 / 118 - 0 / 0
parsec.h
95.1%95.1%
95.1 % 98 / 103 100.0 % 17 / 17
members.c
98.5%98.5%
98.5 % 330 / 335 100.0 % 55 / 55
sumiter.c
95.1%95.1%
95.1 % 1236 / 1300 100.0 % 105 / 105

Generated by: LCOV version 1.14