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.14.0 lcov report (development 27783-affec94c65) Lines: 11902 14855 80.1 %
Date: 2022-07-07 07:34:25 Functions: 1175 1384 84.9 %
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 / 186 0.0 % 0 / 17
gplib.c
54.7%54.7%
54.7 % 522 / 955 64.9 % 63 / 97
default.c
62.9%62.9%
62.9 % 358 / 569 62.7 % 42 / 67
eval.c
69.9%69.9%
69.9 % 1252 / 1790 77.2 % 115 / 149
es.c
74.3%74.3%
74.3 % 2045 / 2752 82.1 % 253 / 308
parse.c
75.2%75.2%
75.2 % 392 / 521 100.0 % 5 / 5
init.c
77.9%77.9%
77.9 % 1162 / 1491 83.3 % 135 / 162
forprime.c
84.4%84.4%
84.4 % 407 / 482 87.2 % 34 / 39
hash.c
87.4%87.4%
87.4 % 160 / 183 96.8 % 30 / 31
compile.c
91.0%91.0%
91.0 % 1594 / 1751 97.8 % 88 / 90
anal.c
91.8%91.8%
91.8 % 636 / 693 94.1 % 95 / 101
parse.y
94.0%94.0%
94.0 % 110 / 117 - 0 / 0
parsec.h
95.1%95.1%
95.1 % 98 / 103 100.0 % 17 / 17
sumiter.c
96.5%96.5%
96.5 % 1185 / 1228 99.0 % 101 / 102
intnum.c
97.0%97.0%
97.0 % 1548 / 1596 98.5 % 129 / 131
members.c
98.5%98.5%
98.5 % 326 / 331 100.0 % 54 / 54
str.c
100.0%
100.0 % 107 / 107 100.0 % 14 / 14

Generated by: LCOV version 1.13