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.16.1 lcov report (development 28676-df828f1c94) Lines: 1572 1760 89.3 %
Date: 2023-08-26 07:54:43 Functions: 148 156 94.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_lval 4000406
Q_lvalrem 4731122
Q_pval 3996080
Q_pvalrem 4732766
ZV_Z_dvd 434
ZV_lval 0
ZV_lvalrem 0
ZV_pval 31871
ZV_pvalrem 3863031
ZX_lval 745240
ZX_lvalrem 721
ZX_pval 510205
ZX_pvalrem 3833411
Z_lval 21738377
Z_lvalrem 40870702
Z_lvalrem_stop 165102056
Z_pval 13275572
Z_pvalrem 32429258
Z_pvalrem_DC 2097355
_domul 2198201
cgetp 14671607
chk_true_err 189
closure_identical 70
cmp_str 588
cmp_universal 91138680
cmp_universal_rec 41850940
cmpfrac 4386180
cmpgen 161
cmpifrac 435416
cmprfrac 49866
col_test 2387
croak 0
ctop 14
cvstop2 266
cvtop 544954
cvtop2 7744041
cx_approx0 1838254
cx_approx_equal 32781
ensure_nb 791217
factorial_lval 2296156
frac_lval 428275
frac_val 310305
gabs 48728060
gaffect 199659
gaffsg 966
gassoc_proto 2405356
gcmp 260431813
gcmpsg 582228
gcvtop 126
gen_2val 771693
gen_2valrem 4737417
gen_Z_divides 6417
gen_lval 1276980
gen_lvalrem 7685480
gen_pval 542076
gen_pvalrem 7696592
gen_pvalrem_DC 11076
gen_z_divides 4697
gequal 226533005
gequal0 1997883755
gequal1 308238940
gequalX 1485554
gequal_try 3198091
gequalm1 74215286
gequalsg 41650
gexpo 571926493
gexpo_safe 572165107
gidentical 63136023
gisexactzero 63481751
glength 4993643
gmax 78141
gmaxgs 0
gmequal_try 28
gmin 12173
gmings 0
gneg 414804955
gneg_i 113009910
gpexponent 89334
gpvaluation 3808
gsigne 80001839
gtolist 5524
gtolong 77
gvaluation 1391467
identicalrr 1379
intdvd 91
is_monomial_test 14704932
is_negative 0
isexactzero 367521520
isless_iu 22999585
isrationalzero 470109722
itop2_coprime 7737874
lexcmp 845698
lexcmp_i 845698
lexcmp_s_matvec 21
lexcmp_scal_matvec 357
lexcmp_scal_vecsmall 42
lexcmp_similar 10003
lexcmp_vec_mat 98
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 196
lexcmp_vecsmall_vec 154
lexcmpgs 42
lexcmpsg 343
list_cmp 343
listcreate_gp 7
listinsert 35028
listkill 7
listpop 21917
listpop0 56
listput 756371
listput0 705208
listsort 21
map_proto_G 462
map_proto_lG 38650748
map_proto_lGL 126
mat_test 16268
matsize 203
minval 336
mklist 6296
mklist_typ 6352
mklistcopy 56
mkmap 49
normalizepol 59373648
normalizepol_approx 0
normalizepol_lg 608224391
normalizeser 13192877
padic_to_Fl 217419
padic_to_Fp 4774
padicaff0 0
polequal 7420868
polidentical 3432098
qtop 28
quadtofp 252
r_approx0 1315702
roughtype 1691739
serequal 413
seridentical 14
sizedigit 7
u_lval 28109536
u_lvalrem 73095170
u_lvalrem_stop 273237510
u_pval 135333
u_pvalrem 2401615
vecequal 5545962
vecidentical 5539011
vecindexmax 409987
vecindexmin 55268
vecmax 66167
vecmax0 128328
vecmin 20555
vecmin0 20632
z_lval 1809239
z_lvalrem 87214
z_pval 1308360
z_pvalrem 266
zx_lval 28924

Generated by: LCOV version 1.14