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 23724-b3bdf5af3) Lines: 10280 13347 77.0 %
Date: 2019-03-25 05:45:24 Functions: 1049 1300 80.7 %
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
gplib.c
53.5%53.5%
53.5 % 472 / 882 63.8 % 60 / 94
es.c
61.3%61.3%
61.3 % 1607 / 2622 67.4 % 205 / 304
default.c
61.7%61.7%
61.7 % 343 / 556 59.7 % 40 / 67
init.c
69.4%69.4%
69.4 % 867 / 1249 75.3 % 110 / 146
eval.c
73.8%73.8%
73.8 % 1092 / 1479 83.9 % 104 / 124
parse.c
76.9%76.9%
76.9 % 276 / 359 100.0 % 5 / 5
forprime.c
84.8%84.8%
84.8 % 386 / 455 87.2 % 34 / 39
hash.c
87.0%87.0%
87.0 % 147 / 169 96.4 % 27 / 28
compile.c
90.2%90.2%
90.2 % 1387 / 1538 97.6 % 82 / 84
anal.c
90.4%90.4%
90.4 % 572 / 633 92.7 % 89 / 96
parse.y
93.8%93.8%
93.8 % 106 / 113 - 0 / 0
sumiter.c
96.7%96.7%
96.7 % 1087 / 1124 98.9 % 91 / 92
parsec.h
97.1%97.1%
97.1 % 100 / 103 100.0 % 17 / 17
str.c
97.2%97.2%
97.2 % 105 / 108 92.9 % 13 / 14
intnum.c
97.6%97.6%
97.6 % 1433 / 1468 99.2 % 118 / 119
members.c
98.7%98.7%
98.7 % 300 / 304 100.0 % 54 / 54

Generated by: LCOV version 1.13