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-24 08:07:32 Functions: 149 158 94.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_lval 6337822
Q_lvalrem 3902383
Q_pval 6333664
Q_pvalrem 3904075
ZV_Z_dvd 539
ZV_lval 0
ZV_lvalrem 0
ZV_pval 32496
ZV_pvalrem 3898585
ZX_lval 745830
ZX_lvalrem 721
ZX_pval 510516
ZX_pvalrem 3824036
Z_lval 24451098
Z_lvalrem 38212551
Z_lvalrem_stop 159472329
Z_pval 13572355
Z_pvalrem 30585670
Z_pvalrem_DC 2148363
_domul 2201967
cgetp 12416900
chk_true_err 189
closure_identical 70
cmp_str 602
cmp_universal 84044184
cmp_universal_rec 39036361
cmpfrac 4386935
cmpgen 161
cmpifrac 435395
cmprfrac 81114
col_test 292411
croak 0
ctop 14
cvstop2 399
cvtop 385814
cvtop2 6821824
cx_approx0 1851240
cx_approx_equal 53397
ensure_nb 791224
factorial_lval 2021927
frac_lval 535495
frac_val 291090
gabs 49810288
gaffect 661953
gaffsg 91812
gassoc_proto 2413776
gcmp 292775064
gcmpsg 613747
gcvtop 126
gen_2val 772208
gen_2valrem 4744080
gen_Z_divides 6592
gen_lval 1278492
gen_lvalrem 7710532
gen_pval 543012
gen_pvalrem 7722626
gen_pvalrem_DC 11441
gen_z_divides 4886
gequal 232189528
gequal0 2221378070
gequal1 312296020
gequalX 1483055
gequal_try 3193345
gequalm1 74216421
gequalsg 41664
gexpo 645871114
gexpo_safe 646106582
gidentical 61840316
gisexactzero 63703633
glength 5141924
gmax 78995
gmaxgs 0
gmequal_try 28
gmin 12173
gmings 0
gneg 446986568
gneg_i 128021137
gpexponent 89599
gpvaluation 3808
gsigne 73714778
gtolist 5538
gtolong 77
gtranslength 0
gvaluation 1162848
identicalrr 1554
intdvd 91
is_monomial_test 14673455
is_negative 0
isexactzero 441575772
isless_iu 22509336
isrationalzero 537712326
itop2_coprime 6815361
lexcmp 1616067
lexcmp_i 1616067
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 38561503
map_proto_lGL 126
mat_test 16268
matsize 203
minval 336
mklist 6345
mklist_typ 6401
mklistcopy 56
mkmap 49
normalizepol 95046332
normalizepol_approx 0
normalizepol_lg 752208561
normalizeser 13323801
padic_to_Fl 217440
padic_to_Fp 4466
padicaff0 0
polequal 7422891
polidentical 3432196
qtop 28
quadtofp 252
r_approx0 1323175
roughtype 3232477
serequal 413
seridentical 14
sizedigit 7
u_lval 30020801
u_lvalrem 74464454
u_lvalrem_stop 274479498
u_pval 135345
u_pvalrem 2391758
vecequal 5593070
vecidentical 5244575
vecindexmax 502347
vecindexmin 168048
vecmax 66057
vecmax0 226125
vecmin 21314
vecmin0 133391
z_lval 1809325
z_lvalrem 87343
z_pval 1306546
z_pvalrem 399
zx_lval 28924

Generated by: LCOV version 1.14