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.2 lcov report (development 29420-55f63b8cfe) Lines: 1585 1780 89.0 %
Date: 2024-07-03 09:03:24 Functions: 149 158 94.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_lval 9297144
Q_lvalrem 6268876
Q_pval 9292963
Q_pvalrem 6270472
ZV_Z_dvd 539
ZV_lval 0
ZV_lvalrem 0
ZV_pval 32529
ZV_pvalrem 3929056
ZX_lval 746096
ZX_lvalrem 721
ZX_pval 510180
ZX_pvalrem 3820799
Z_lval 62675545
Z_lvalrem 59488360
Z_lvalrem_stop 156124000
Z_pval 47068946
Z_pvalrem 49640288
Z_pvalrem_DC 2095623
_domul 2204941
cgetp 16899498
chk_true_err 189
closure_identical 70
cmp_str 672
cmp_universal 84342879
cmp_universal_rec 39093798
cmpfrac 4588483
cmpgen 161
cmpifrac 455541
cmprfrac 81133
col_test 292411
croak 0
ctop 14
cvstop2 399
cvtop 600431
cvtop2 17615820
cx_approx0 1849449
cx_approx_equal 53397
ensure_nb 791252
factorial_lval 1982939
frac_lval 390862
frac_val 292597
gabs 50289108
gaffect 664508
gaffsg 91826
gassoc_proto 2418428
gcmp 289306163
gcmpsg 616386
gcvtop 126
gen_2val 772514
gen_2valrem 4759233
gen_Z_divides 6574
gen_lval 1278455
gen_lvalrem 7737768
gen_pval 542709
gen_pvalrem 7749845
gen_pvalrem_DC 11416
gen_z_divides 4879
gequal 232599303
gequal0 2250228557
gequal1 312957342
gequalX 1484326
gequal_try 3196114
gequalm1 74232864
gequalsg 43988
gexpo 817413190
gexpo_safe 817651749
gidentical 61987843
gisexactzero 63700752
glength 5141966
gmax 79268
gmaxgs 0
gmequal_try 28
gmin 12180
gmings 0
gneg 454791232
gneg_i 129126793
gpexponent 89627
gpvaluation 3808
gsigne 74531863
gtolist 5580
gtolong 77
gtranslength 0
gvaluation 1166387
identicalrr 1547
intdvd 91
is_monomial_test 14684177
is_negative 0
isexactzero 450569494
isless_iu 22165491
isrationalzero 547435437
itop2_coprime 17608394
lexcmp 1616126
lexcmp_i 1616126
lexcmp_s_matvec 21
lexcmp_scal_matvec 357
lexcmp_scal_vecsmall 42
lexcmp_similar 371976
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 35014
listinsert0 35028
listkill 7
listpop 21917
listpop0 56
listput 756406
listput0 705236
listsort 21
map_proto_G 462
map_proto_lG 37343116
map_proto_lGL 126
mat_test 16268
matsize 203
minval 336
mklist 6492
mklist_typ 6548
mklistcopy 63
mkmap 49
normalizepol 98839232
normalizepol_approx 0
normalizepol_lg 767685908
normalizeser 13402114
padic_to_Fl 421709
padic_to_Fp 4466
padicaff0 0
polequal 7446901
polidentical 3432196
qtop 28
quadtofp 252
r_approx0 1322062
roughtype 3232594
serequal 420
seridentical 14
sizedigit 7
u_lval 65767412
u_lvalrem 77934244
u_lvalrem_stop 248001833
u_pval 136822
u_pvalrem 2593676
vecequal 5625491
vecidentical 5249401
vecindexmax 503130
vecindexmin 181317
vecmax 66119
vecmax0 226718
vecmin 34499
vecmin0 146667
z_lval 1822489
z_lvalrem 87343
z_pval 1317736
z_pvalrem 399
zx_lval 28931

Generated by: LCOV version 1.16