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

Generated by: LCOV version 1.14