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 29115-f22e516b23) Lines: 1577 1772 89.0 %
Date: 2024-03-28 08:06:56 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 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
minval 336
lexcmpsg 343
list_cmp 343
lexcmp_scal_matvec 357
cvstop2 399
z_pvalrem 399
serequal 413
map_proto_G 462
ZV_Z_dvd 539
cmp_str 602
ZX_lvalrem 721
identicalrr 1554
gpvaluation 3808
padic_to_Fp 4466
gen_z_divides 4886
gtolist 5538
mklist 6345
mklist_typ 6401
gen_Z_divides 6592
gen_pvalrem_DC 11441
gmin 12173
mat_test 16268
vecmin 21314
listpop 21917
zx_lval 28924
ZV_pval 32496
listinsert 35014
listinsert0 35028
gequalsg 41664
cx_approx_equal 53397
vecmax 66054
gmax 78995
cmprfrac 81114
z_lvalrem 87342
gpexponent 89599
gaffsg 91812
vecmin0 133391
u_pval 135500
vecindexmin 168048
padic_to_Fl 217446
vecmax0 226122
frac_val 291090
col_test 292411
lexcmp_similar 371976
cvtop 385808
cmpifrac 435395
vecindexmax 502346
ZX_pval 510516
frac_lval 535497
gen_pval 543012
gcmpsg 613747
gaffect 661953
listput0 705215
ZX_lval 745830
listput 756378
gen_2val 772208
ensure_nb 791224
gvaluation 1162848
gen_lval 1278492
z_pval 1306546
r_approx0 1323430
gequalX 1483063
lexcmp 1616063
lexcmp_i 1616063
z_lval 1809328
cx_approx0 1851533
factorial_lval 2021911
Z_pvalrem_DC 2148455
_domul 2201967
u_pvalrem 2391763
gassoc_proto 2413791
gequal_try 3193345
roughtype 3232467
polidentical 3432196
ZX_pvalrem 3824029
ZV_pvalrem 3898577
Q_lvalrem 3902428
Q_pvalrem 3904117
cmpfrac 4386935
gen_2valrem 4744131
glength 5141924
vecidentical 5244578
vecequal 5593069
Q_pval 6333291
Q_lval 6337448
itop2_coprime 6814317
cvtop2 6820898
polequal 7422886
gen_lvalrem 7710519
gen_pvalrem 7722616
cgetp 12417012
normalizeser 13323801
Z_pval 13572205
is_monomial_test 14673602
isless_iu 22509434
Z_lval 24450351
u_lval 30020593
Z_pvalrem 30584035
Z_lvalrem 38210686
cmp_universal_rec 39036377
map_proto_lG 39165149
gabs 49811512
gidentical 61840553
gisexactzero 63703682
gsigne 73714916
gequalm1 74216421
u_lvalrem 74462235
cmp_universal 84045041
normalizepol 95049581
gneg_i 128042782
Z_lvalrem_stop 159502915
gequal 232189520
u_lvalrem_stop 274496587
gcmp 293270732
gequal1 312298050
isexactzero 441590123
gneg 447001075
isrationalzero 537728190
gexpo 645970155
gexpo_safe 646203949
normalizepol_lg 752242664
gequal0 2221554946

Generated by: LCOV version 1.14