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-18 08:06: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 6337444
Q_lvalrem 3902415
Q_pval 6333287
Q_pvalrem 3904099
ZV_Z_dvd 539
ZV_lval 0
ZV_lvalrem 0
ZV_pval 32496
ZV_pvalrem 3898535
ZX_lval 745830
ZX_lvalrem 721
ZX_pval 510516
ZX_pvalrem 3824003
Z_lval 24450134
Z_lvalrem 38213107
Z_lvalrem_stop 159452379
Z_pval 13571826
Z_pvalrem 30586082
Z_pvalrem_DC 2148056
_domul 2201967
cgetp 12416872
chk_true_err 189
closure_identical 70
cmp_str 602
cmp_universal 84043079
cmp_universal_rec 39035944
cmpfrac 4386935
cmpgen 161
cmpifrac 435395
cmprfrac 81114
col_test 292411
croak 0
ctop 14
cvstop2 399
cvtop 385808
cvtop2 6822247
cx_approx0 1851392
cx_approx_equal 53397
ensure_nb 791224
factorial_lval 2021914
frac_lval 535492
frac_val 291090
gabs 49812328
gaffect 661953
gaffsg 91812
gassoc_proto 2413781
gcmp 293042134
gcmpsg 613747
gcvtop 126
gen_2val 772208
gen_2valrem 4744202
gen_Z_divides 6592
gen_lval 1278492
gen_lvalrem 7710442
gen_pval 543012
gen_pvalrem 7722534
gen_pvalrem_DC 11441
gen_z_divides 4886
gequal 232189536
gequal0 2221621010
gequal1 312299587
gequalX 1483063
gequal_try 3193345
gequalm1 74216421
gequalsg 41664
gexpo 645891563
gexpo_safe 646127325
gidentical 61840226
gisexactzero 63703581
glength 5141924
gmax 78995
gmaxgs 0
gmequal_try 28
gmin 12173
gmings 0
gneg 447001665
gneg_i 128033751
gpexponent 89599
gpvaluation 3808
gsigne 73714887
gtolist 5538
gtolong 77
gtranslength 0
gvaluation 1162848
identicalrr 1554
intdvd 91
is_monomial_test 14673519
is_negative 0
isexactzero 441598362
isless_iu 22508102
isrationalzero 537730821
itop2_coprime 6815751
lexcmp 1616057
lexcmp_i 1616058
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 756378
listput0 705215
listsort 21
map_proto_G 462
map_proto_lG 38892791
map_proto_lGL 126
mat_test 16268
matsize 203
minval 336
mklist 6345
mklist_typ 6401
mklistcopy 56
mkmap 49
normalizepol 95049816
normalizepol_approx 0
normalizepol_lg 752250652
normalizeser 13323801
padic_to_Fl 217438
padic_to_Fp 4466
padicaff0 0
polequal 7422888
polidentical 3432196
qtop 28
quadtofp 252
r_approx0 1323305
roughtype 3232456
serequal 413
seridentical 14
sizedigit 7
u_lval 30019580
u_lvalrem 74465267
u_lvalrem_stop 274407977
u_pval 135317
u_pvalrem 2391798
vecequal 5593072
vecidentical 5244532
vecindexmax 502347
vecindexmin 168048
vecmax 66055
vecmax0 226123
vecmin 21314
vecmin0 133391
z_lval 1809337
z_lvalrem 87349
z_pval 1306554
z_pvalrem 399
zx_lval 28924

Generated by: LCOV version 1.14