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 23222-06b1652be) Lines: 9955 12995 76.6 %
Date: 2018-11-15 05:40:53 Functions: 1017 1262 80.6 %
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
default.c
61.6%61.6%
61.6 % 342 / 555 59.7 % 40 / 67
gplib.c
48.9%48.9%
48.9 % 429 / 877 61.3 % 57 / 93
es.c
61.4%61.4%
61.4 % 1606 / 2617 67.9 % 205 / 302
init.c
69.7%69.7%
69.7 % 832 / 1193 74.8 % 101 / 135
eval.c
73.8%73.8%
73.8 % 1020 / 1383 82.9 % 92 / 111
forprime.c
84.7%84.7%
84.7 % 382 / 451 86.8 % 33 / 38
hash.c
82.5%82.5%
82.5 % 137 / 166 92.6 % 25 / 27
str.c
96.9%96.9%
96.9 % 94 / 97 92.9 % 13 / 14
anal.c
92.1%92.1%
92.1 % 584 / 634 94.8 % 91 / 96
compile.c
90.2%90.2%
90.2 % 1350 / 1497 98.8 % 79 / 80
intnum.c
97.5%97.5%
97.5 % 1401 / 1437 99.1 % 114 / 115
parse.y
95.3%95.3%
95.3 % 123 / 129 - 0 / 0
parse.c
69.2%69.2%
69.2 % 173 / 250 100.0 % 5 / 5
parsec.h
97.1%97.1%
97.1 % 100 / 103 100.0 % 17 / 17
members.c
98.7%98.7%
98.7 % 300 / 304 100.0 % 54 / 54
sumiter.c
96.9%96.9%
96.9 % 1082 / 1117 100.0 % 91 / 91

Generated by: LCOV version 1.13