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 - basemath - bibli2.c (source / functions) Coverage Total Hit
Test: PARI/GP v2.19.0 lcov report (development 31057-89c4d54ba6) Lines: 95.3 % 1305 1244
Test Date: 2026-07-25 17:02:42 Functions: 95.9 % 121 116
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
indexlexsort 0
polhermite_eval 0
pollaguerre_eval 0
pollegendre_eval 0
pollegendre_reduced 0
err_reverse 7
key_search 7
setintersect 7
setunion 7
setunion_i 7
convol 14
polchebyshev1_eval 14
pollaplace 14
serlaplace 14
setdelta 14
setisset 14
err_hermite 21
err_lag 21
setbinop 21
modreverse 28
laplace 35
polchebyshev2_eval 35
indexvecsort 42
ZV_sort 63
polchebyshev1_eval_aux 70
cmp_small 77
eulerianpol 77
gprec 91
polchebyshev2_eval_aux 91
mathilbert 133
check_positive_entries 140
stirling1 154
polrecip 161
ZC_union_shallow 182
RgXQ_reverse 189
RgV_polint 224
RgV_polint_fast 224
gen_setminus 259
setminus 259
stirling 301
polint 329
polint_i 329
dirmul 441
vecsort0 749
vec_equiv 1141
ZV_sort_shallow 1288
polhermite 1442
polhermite_eval0 1477
stirling2 1694
binomial0 1855
pollaguerre 2128
polchebyshev2 2135
polchebyshev1 2156
pollaguerre_eval0 2163
pollegendre 2163
pollegendre_eval0 2177
vecsort 2954
binomial_lval 3206
ZV_indexsort 3773
polchebyshev 4284
polchebyshev_eval 4333
cmp_RgX_Rg 4661
matqpascal 5061
QXQ_reverse 6111
closurecmp 7909
check_dy 16188
polintspec 16223
inC 17357
vec_reduce 23044
ZM_merge_factor 30792
ZV_union_shallow 39354
ZV_union_shallow_t 39536
ZV_sort_uniq_shallow 39850
vandermondeinverse 54839
binomialuu 63139
ZV_sort_uniq 66248
binomial 74592
gen_indexsort_uniq 76271
vandermondeinverseinit 85730
polcyclo_eval 100293
lexsort 127981
vecsearch 128247
sort_function 128996
cmp_RgX 130371
indexsort 205793
gtoset 227122
veccmp 295183
cmp_Flx 326390
gen_sort_uniq 353892
gen_sort_shallow 424249
dirdiv 434322
merge_sort_uniq 455057
polcyclo_prime 487799
setsearch 536431
polcyclo 614581
merge_factor 692082
cmp_prime_ideal 705492
gen_indexsort 859982
dirval 869526
ZV_search 1074432
tablesearch 1148558
ZV_sort_inplace 1991692
sort_factor_pol 2017052
sort 2098400
triv_sort 2260553
gen_sortspec_uniq 2292965
sort_extract 3237348
cmp_prime_over_p 3477963
gen_sort 5144016
gen_cmp_RgX 5653778
gprec_wtrunc 5824448
gprec_wensure 6842542
vecbinomial 7190614
sort_factor 9949280
zv_search 13191589
gprec_w 19822811
gen_search 24034171
gen_sort_inplace 40890012
init_sort 47748450
gen_sortspec 191728173
cmp_nodata 649770776

Generated by: LCOV version 2.0-1