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 29419-8afb0ed749) Lines: 1585 1780 89.0 %
Date: 2024-07-02 09:03:41 Functions: 149 158 94.3 %
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
gtranslength 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 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
matsize 203
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 539
cmp_str 672
ZX_lvalrem 721
identicalrr 1547
gpvaluation 3808
padic_to_Fp 4466
gen_z_divides 4879
gtolist 5580
mklist 6492
mklist_typ 6548
gen_Z_divides 6574
gen_pvalrem_DC 11416
gmin 12180
mat_test 16268
listpop 21917
zx_lval 28931
ZV_pval 32529
vecmin 34499
listinsert 35014
listinsert0 35028
gequalsg 43988
cx_approx_equal 53397
vecmax 66121
gmax 79268
cmprfrac 81133
z_lvalrem 87342
gpexponent 89627
gaffsg 91826
u_pval 136948
vecmin0 146667
vecindexmin 181317
vecmax0 226720
col_test 292411
frac_val 292597
lexcmp_similar 371973
frac_lval 390862
padic_to_Fl 421704
cmpifrac 455541
vecindexmax 503132
ZX_pval 510180
gen_pval 542709
cvtop 600438
gcmpsg 616386
gaffect 664508
listput0 705236
ZX_lval 746096
listput 756406
gen_2val 772514
ensure_nb 791252
gvaluation 1166387
gen_lval 1278455
z_pval 1317742
r_approx0 1322130
gequalX 1484319
lexcmp 1616119
lexcmp_i 1616119
z_lval 1822470
cx_approx0 1849534
factorial_lval 1982927
Z_pvalrem_DC 2095602
_domul 2204941
gassoc_proto 2418429
u_pvalrem 2593734
gequal_try 3196114
roughtype 3232579
polidentical 3432196
ZX_pvalrem 3820842
ZV_pvalrem 3929086
cmpfrac 4588483
gen_2valrem 4759319
glength 5141966
vecidentical 5249403
vecequal 5625492
Q_lvalrem 6268861
Q_pvalrem 6270479
polequal 7446899
gen_lvalrem 7737843
gen_pvalrem 7749931
Q_pval 9293001
Q_lval 9297180
normalizeser 13402114
is_monomial_test 14684174
cgetp 16899467
itop2_coprime 17607544
cvtop2 17615342
isless_iu 22167665
map_proto_lG 37294049
cmp_universal_rec 39093937
Z_pval 47068987
Z_pvalrem 49638633
gabs 50286715
Z_lvalrem 59486385
gidentical 61987945
Z_lval 62675705
gisexactzero 63700684
u_lval 65767742
gequalm1 74232864
gsigne 74531830
u_lvalrem 77932025
cmp_universal 84343322
normalizepol 98847932
gneg_i 129126479
Z_lvalrem_stop 156207627
gequal 232599691
u_lvalrem_stop 248098354
gcmp 289331961
gequal1 312958137
isexactzero 450603059
gneg 454782771
isrationalzero 547456679
normalizepol_lg 767748202
gexpo 817412547
gexpo_safe 817651898
gequal0 2250416714

Generated by: LCOV version 1.16