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 24504-0a2b20c0b) Lines: 10327 13409 77.0 %
Date: 2019-10-23 05:48:59 Functions: 1052 1311 80.2 %
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 % 1383 / 1534 97.6 % 82 / 84
default.c
61.5%61.5%
61.5 % 343 / 558 59.7 % 40 / 67
es.c
60.0%60.0%
60.0 % 1570 / 2618 64.3 % 196 / 305
eval.c
74.3%74.3%
74.3 % 1111 / 1495 84.5 % 109 / 129
forprime.c
85.5%85.5%
85.5 % 406 / 475 87.2 % 34 / 39
gplib.c
53.3%53.3%
53.3 % 471 / 884 63.8 % 60 / 94
hash.c
87.4%87.4%
87.4 % 152 / 174 96.7 % 29 / 30
init.c
70.7%70.7%
70.7 % 882 / 1247 76.2 % 112 / 147
intnum.c
97.6%97.6%
97.6 % 1432 / 1467 99.2 % 118 / 119
members.c
98.7%98.7%
98.7 % 303 / 307 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
100.0%
100.0 % 108 / 108 100.0 % 14 / 14
sumiter.c
96.8%96.8%
96.8 % 1112 / 1149 98.9 % 93 / 94

Generated by: LCOV version 1.13