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-05-03 08:08:58 Functions: 149 158 94.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_lval 6337387
Q_lvalrem 3902419
Q_pval 6333226
Q_pvalrem 3904107
ZV_Z_dvd 539
ZV_lval 0
ZV_lvalrem 0
ZV_pval 32496
ZV_pvalrem 3898533
ZX_lval 745830
ZX_lvalrem 721
ZX_pval 510516
ZX_pvalrem 3823942
Z_lval 24449798
Z_lvalrem 38209274
Z_lvalrem_stop 159548391
Z_pval 13571484
Z_pvalrem 30583015
Z_pvalrem_DC 2147772
_domul 2201967
cgetp 12416915
chk_true_err 189
closure_identical 70
cmp_str 602
cmp_universal 84044315
cmp_universal_rec 39036284
cmpfrac 4386935
cmpgen 161
cmpifrac 435395
cmprfrac 81114
col_test 292411
croak 0
ctop 14
cvstop2 399
cvtop 385818
cvtop2 6820460
cx_approx0 1851426
cx_approx_equal 53397
ensure_nb 791224
factorial_lval 2021920
frac_lval 535489
frac_val 291090
gabs 49809451
gaffect 661953
gaffsg 91812
gassoc_proto 2413808
gcmp 292706241
gcmpsg 613747
gcvtop 126
gen_2val 772208
gen_2valrem 4744123
gen_Z_divides 6592
gen_lval 1278492
gen_lvalrem 7710403
gen_pval 543012
gen_pvalrem 7722481
gen_pvalrem_DC 11441
gen_z_divides 4886
gequal 232189368
gequal0 2221344234
gequal1 312300092
gequalX 1483062
gequal_try 3193345
gequalm1 74216421
gequalsg 41664
gexpo 645692772
gexpo_safe 645932167
gidentical 61840512
gisexactzero 63703542
glength 5141924
gmax 78995
gmaxgs 0
gmequal_try 28
gmin 12172
gmings 0
gneg 446989508
gneg_i 128032724
gpexponent 89599
gpvaluation 3808
gsigne 73714958
gtolist 5538
gtolong 77
gtranslength 0
gvaluation 1162848
identicalrr 1554
intdvd 91
is_monomial_test 14673202
is_negative 0
isexactzero 441598254
isless_iu 22509966
isrationalzero 537729989
itop2_coprime 6813852
lexcmp 1616065
lexcmp_i 1616065
lexcmp_s_matvec 21
lexcmp_scal_matvec 357
lexcmp_scal_vecsmall 42
lexcmp_similar 371979
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 756378
listput0 705215
listsort 21
map_proto_G 462
map_proto_lG 38500489
map_proto_lGL 126
mat_test 16268
matsize 203
minval 336
mklist 6345
mklist_typ 6401
mklistcopy 56
mkmap 49
normalizepol 95054320
normalizepol_approx 0
normalizepol_lg 752250042
normalizeser 13323801
padic_to_Fl 217442
padic_to_Fp 4466
padicaff0 0
polequal 7422891
polidentical 3432196
qtop 28
quadtofp 252
r_approx0 1323332
roughtype 3232473
serequal 413
seridentical 14
sizedigit 7
u_lval 30020087
u_lvalrem 74461091
u_lvalrem_stop 274508525
u_pval 135462
u_pvalrem 2391711
vecequal 5593066
vecidentical 5244588
vecindexmax 502346
vecindexmin 168048
vecmax 66054
vecmax0 226122
vecmin 21314
vecmin0 133391
z_lval 1809320
z_lvalrem 87345
z_pval 1306533
z_pvalrem 399
zx_lval 28924

Generated by: LCOV version 1.14