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 23690-5d6e28857) Lines: 10278 13336 77.1 %
Date: 2019-03-18 05:43:21 Functions: 1047 1297 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
anal.c
90.4%90.4%
90.4 % 572 / 633 92.7 % 89 / 96
compile.c
90.2%90.2%
90.2 % 1396 / 1548 97.6 % 83 / 85
default.c
61.7%61.7%
61.7 % 343 / 556 59.7 % 40 / 67
es.c
61.3%61.3%
61.3 % 1607 / 2622 67.4 % 205 / 304
eval.c
74.2%74.2%
74.2 % 1079 / 1455 84.3 % 102 / 121
forprime.c
84.8%84.8%
84.8 % 385 / 454 86.8 % 33 / 38
gplib.c
53.5%53.5%
53.5 % 472 / 882 63.8 % 60 / 94
hash.c
87.0%87.0%
87.0 % 147 / 169 96.4 % 27 / 28
init.c
69.4%69.4%
69.4 % 867 / 1249 75.3 % 110 / 146
intnum.c
97.6%97.6%
97.6 % 1437 / 1473 99.2 % 118 / 119
members.c
98.7%98.7%
98.7 % 300 / 304 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
97.2%97.2%
97.2 % 105 / 108 92.9 % 13 / 14
sumiter.c
96.7%96.7%
96.7 % 1086 / 1123 98.9 % 91 / 92

Generated by: LCOV version 1.13