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 - gen2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29712-7c8a932571) Lines: 1577 1789 88.1 %
Date: 2024-11-15 09:08:45 Functions: 148 159 93.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ZV_lval 0
ZV_lvalrem 0
ZXV_pvalrem 0
ZXX_pvalrem 0
ZX_gen_pvalrem 0
croak 0
gmaxgs 0
gmings 0
is_negative 0
normalizepol_approx 0
padicaff0 0
sizedigit 7
ctop 14
seridentical 14
lexcmp_s_matvec 21
listsort 21
gmequal_try 28
qtop 28
lexcmp_scal_vecsmall 42
lexcmp_vecsmall_mat 42
lexcmpgs 42
mkmap 49
listpop0 56
mklistcopy 63
closure_identical 70
gtolong 77
intdvd 91
lexcmp_vec_mat 98
gcvtop 126
map_proto_lGL 126
lexcmp_vecsmall_vec 154
cmpgen 161
chk_true_err 189
lexcmp_vecsmall_other 196
quadtofp 252
minval 336
lexcmpsg 343
list_cmp 343
lexcmp_scal_matvec 357
cvstop2 399
z_pvalrem 399
serequal 420
map_proto_G 462
ZV_Z_dvd 616
cmp_str 672
ZX_lvalrem 721
identicalrr 1547
matsize 1862
gpvaluation 3808
gtranslength 3878
padic_to_Fp 4466
gen_z_divides 4885
gtolist 5930
gen_Z_divides 6580
mklist 6835
mklist_typ 6891
gen_pvalrem_DC 11428
gmin 12264
mat_test 16310
listpop 21917
zx_lval 28931
ZV_pval 33640
vecmin 34506
listinsert 35014
listinsert0 35028
gequalsg 43988
cx_approx_equal 53397
vecmax 66163
gmax 79268
cmprfrac 81175
z_lvalrem 87328
gpexponent 89634
gaffsg 91840
ZX_pval 97705
gen_pval 131345
u_pval 136810
vecmin0 146674
vecindexmin 181324
vecmax0 226761
frac_val 292590
col_test 294364
lexcmp_similar 371978
frac_lval 392196
padic_to_Fl 421704
cmpifrac 455541
vecindexmax 503187
cvtop 600440
gcmpsg 616386
gaffect 664578
listput0 724955
ZX_lval 748784
gen_2val 775319
listput 776125
ensure_nb 810971
gen_lval 869811
gvaluation 1166387
z_pval 1317745
gequalX 1484313
lexcmp 1616134
lexcmp_i 1616134
r_approx0 1748767
z_lval 1824402
factorial_lval 1983126
Z_pvalrem_DC 2104580
_domul 2205255
gassoc_proto 2418990
cx_approx0 2477666
u_pvalrem 2595575
gequal_try 3197997
roughtype 3232611
polidentical 3432210
ZV_pvalrem 3968801
ZX_pvalrem 4252729
cmpfrac 4588890
gen_2valrem 4801934
glength 5145627
vecidentical 5264780
vecequal 5651906
Q_lvalrem 6300247
Q_pvalrem 6301835
polequal 7683981
gen_lvalrem 8209339
gen_pvalrem 8221530
Q_pval 9336404
Q_lval 9340607
normalizeser 13403542
is_monomial_test 15237937
cgetp 16899470
itop2_coprime 17608007
cvtop2 17615087
isless_iu 21943507
map_proto_lG 36980445
cmp_universal_rec 39215839
Z_pval 47062394
Z_pvalrem 49678680
gabs 53228404
Z_lvalrem 59603200
gidentical 62038643
Z_lval 62779123
gisexactzero 63711757
u_lval 65810526
gequalm1 74232902
u_lvalrem 78017160
gsigne 79451059
cmp_universal 84945414
normalizepol 99193678
gneg_i 133309631
Z_lvalrem_stop 156055139
gequal 234102412
u_lvalrem_stop 247618403
gcmp 290888179
gequal1 323227865
isexactzero 455302722
gneg 466120847
isrationalzero 555257415
normalizepol_lg 784181886
gexpo 820713201
gexpo_safe 820954269
gequal0 2291279229

Generated by: LCOV version 1.16