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 24038-ebe36f6c4) Lines: 10295 13383 76.9 %
Date: 2019-07-23 05:53:17 Functions: 1047 1306 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
readline.c
0.0%
0.0 % 0 / 185 0.0 % 0 / 17
gplib.c
53.3%53.3%
53.3 % 471 / 884 63.8 % 60 / 94
es.c
60.0%60.0%
60.0 % 1570 / 2618 64.3 % 196 / 305
default.c
61.5%61.5%
61.5 % 343 / 558 59.7 % 40 / 67
init.c
70.5%70.5%
70.5 % 879 / 1247 76.2 % 112 / 147
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
85.2%85.2%
85.2 % 397 / 466 87.2 % 34 / 39
hash.c
87.4%87.4%
87.4 % 152 / 174 96.7 % 29 / 30
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.8%96.8%
96.8 % 1106 / 1143 98.9 % 93 / 94
parsec.h
97.1%97.1%
97.1 % 100 / 103 100.0 % 17 / 17
intnum.c
97.6%97.6%
97.6 % 1433 / 1468 99.2 % 118 / 119
members.c
98.7%98.7%
98.7 % 303 / 307 100.0 % 54 / 54
str.c
100.0%
100.0 % 108 / 108 100.0 % 14 / 14

Generated by: LCOV version 1.13