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 23955-17de75d95) Lines: 10281 13385 76.8 %
Date: 2019-06-15 05:47:29 Functions: 1045 1306 80.0 %
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 % 1387 / 1538 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
73.8%73.8%
73.8 % 1092 / 1479 83.9 % 104 / 124
forprime.c
85.2%85.2%
85.2 % 397 / 466 87.2 % 34 / 39
gplib.c
53.3%53.3%
53.3 % 472 / 885 63.8 % 60 / 94
hash.c
87.4%87.4%
87.4 % 152 / 174 96.7 % 29 / 30
init.c
69.3%69.3%
69.3 % 867 / 1251 74.8 % 110 / 147
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
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 % 1106 / 1143 98.9 % 93 / 94

Generated by: LCOV version 1.13