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) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30391-f41a6adeb0) Lines: 1235 1295 95.4 %
Date: 2025-07-14 09:22:41 Functions: 116 121 95.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by 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
check_positive_entries 133
mathilbert 133
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 336
vecsort0 742
vec_equiv 1141
ZV_sort_shallow 1288
polhermite 1442
polhermite_eval0 1477
stirling2 1694
binomial0 1854
pollaguerre 2128
polchebyshev2 2135
polchebyshev1 2156
pollaguerre_eval0 2163
pollegendre 2163
pollegendre_eval0 2177
vecsort 2954
binomial_lval 3206
ZV_indexsort 3713
matqpascal 4004
polchebyshev 4284
polchebyshev_eval 4333
cmp_RgX_Rg 4485
QXQ_reverse 6125
closurecmp 7909
check_dy 16188
polintspec 16223
inC 17357
vec_reduce 21784
ZM_merge_factor 30949
ZV_union_shallow 39361
ZV_union_shallow_t 39543
ZV_sort_uniq_shallow 39703
vandermondeinverse 54241
ZV_sort_uniq 66248
gen_indexsort_uniq 76089
binomialuu 81267
setsearch 83622
vandermondeinverseinit 85132
polcyclo_eval 100299
binomial 102724
vecsearch 126147
sort_function 126889
cmp_RgX 126959
lexsort 127980
indexsort 205057
gtoset 227115
veccmp 295015
cmp_Flx 323349
gen_sort_uniq 353899
gen_sort_shallow 407098
dirdiv 434322
merge_sort_uniq 454220
polcyclo_prime 508400
polcyclo 634833
merge_factor 692239
cmp_prime_ideal 705393
gen_indexsort 852763
dirval 869316
ZV_search 1073745
tablesearch 1146345
ZV_sort_inplace 1221598
sort_factor_pol 2019019
sort 2096373
triv_sort 2257471
gen_sortspec_uniq 2290873
sort_extract 3232090
cmp_prime_over_p 3471802
gprec_wtrunc 3742363
gen_sort 5135655
gen_cmp_RgX 5587132
gprec_wensure 6275640
vecbinomial 7188559
sort_factor 9921066
gprec_w 12684351
zv_search 13100657
gen_search 23575146
gen_sort_inplace 40109455
init_sort 46934924
gen_sortspec 190808377
cmp_nodata 644796480

Generated by: LCOV version 1.16