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-04-23 08:07:35 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 66058
gmax 78995
cmprfrac 81114
z_lvalrem 87348
gpexponent 89599
gaffsg 91812
vecmin0 133391
u_pval 135414
vecindexmin 168048
padic_to_Fl 217439
vecmax0 226126
frac_val 291090
col_test 292411
lexcmp_similar 371976
cvtop 385812
cmpifrac 435395
vecindexmax 502349
ZX_pval 510516
frac_lval 535495
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 1306548
r_approx0 1323426
gequalX 1483061
lexcmp 1616056
lexcmp_i 1616059
z_lval 1809341
cx_approx0 1851546
factorial_lval 2021942
Z_pvalrem_DC 2148220
_domul 2201967
u_pvalrem 2391850
gassoc_proto 2413775
gequal_try 3193345
roughtype 3232459
polidentical 3432196
ZX_pvalrem 3824116
ZV_pvalrem 3898571
Q_lvalrem 3902407
Q_pvalrem 3904096
cmpfrac 4386935
gen_2valrem 4744361
glength 5141924
vecidentical 5244552
vecequal 5593066
Q_pval 6333089
Q_lval 6337248
itop2_coprime 6814817
cvtop2 6821242
polequal 7422890
gen_lvalrem 7710606
gen_pvalrem 7722691
cgetp 12416953
normalizeser 13323801
Z_pval 13572035
is_monomial_test 14673597
isless_iu 22509907
Z_lval 24450222
u_lval 30019996
Z_pvalrem 30584688
Z_lvalrem 38211384
cmp_universal_rec 39036076
map_proto_lG 39066445
gabs 49811125
gidentical 61840347
gisexactzero 63703584
gsigne 73715030
gequalm1 74216421
u_lvalrem 74463542
cmp_universal 84043535
normalizepol 95050101
gneg_i 128033846
Z_lvalrem_stop 159636091
gequal 232189555
u_lvalrem_stop 274634010
gcmp 293225557
gequal1 312300630
isexactzero 441608338
gneg 446990790
isrationalzero 537743448
gexpo 645928506
gexpo_safe 646164506
normalizepol_lg 752247241
gequal0 2221379910

Generated by: LCOV version 1.14