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 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.12.0 lcov report (development 22933-0de3639e3) Lines: 1323 1496 88.4 %
Date: 2018-08-19 05:36:10 Functions: 137 146 93.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_pval 1404031
Q_pvalrem 432400
ZV_Z_dvd 245
ZV_lval 0
ZV_lvalrem 0
ZV_pval 6685
ZV_pvalrem 106957
ZX_lval 42
ZX_lvalrem 0
ZX_pval 7973
ZX_pvalrem 543375
Z_lval 10843830
Z_lvalrem 8319478
Z_lvalrem_stop 571142873
Z_pval 6836816
Z_pvalrem 6012497
Z_pvalrem_DC 1354886
_domul 297993
cgetp 1549843
closure_identical 35
cmp_str 476
cmp_universal 48136923
cmp_universal_rec 27144986
cmpfrac 80166
cmpgen 63
cmpifrac 5852
cmprfrac 35952
col_test 2058
croak 0
ctop 14
cvstop2 0
cvtop 46562
cvtop2 274453
cx_approx_equal 9268
ensure_nb 786198
factorial_lval 114505
gabs 9943120
gaffect 245948
gaffsg 1022
gassoc_proto 327452
gcmp 155728461
gcmpsg 39892
gcvtop 70
gen_2val 5523
gen_2valrem 304161
gen_Z_divides 4361
gen_lval 12480
gen_lvalrem 650128
gen_pval 14658
gen_pvalrem 650332
gen_pvalrem_DC 7012
gen_z_divides 2695
gequal 139235626
gequal0 566497108
gequal1 154867079
gequalX 1184981
gequal_try 2289634
gequalm1 111184
gequalsg 25592
gexpo 104279159
gexpo_safe 104321194
gidentical 36657753
gisexactzero 53548370
glength 4562705
gmax 7
gmaxgs 0
gmin 1141
gmings 0
gneg 209044866
gneg_i 42281092
gpexponent 105
gpvaluation 3661
gsigne 3567109
gtolist 417
gtolong 77
gvaluation 204192
identicalrr 21
intdvd 91
is_monomial_test 13176414
is_negative 0
isexactzero 218042123
isless_iu 187436213
isrationalzero 231647834
lexcmp 2979052
lexcmp_s_matvec 21
lexcmp_scal_matvec 245
lexcmp_scal_vecsmall 28
lexcmp_similar 8036
lexcmp_vec_mat 98
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 182
lexcmp_vecsmall_vec 154
lexcmpgs 28
lexcmpsg 329
list_cmp 336
listcreate_gp 7
listinsert 35014
listkill 7
listpop 21910
listpop0 35
listput 751226
listput0 700224
listsort 21
map_proto_G 140
map_proto_lG 1142567
map_proto_lGL 126
mat_test 16184
matsize 119
minval 231
mklist 736
mklist_typ 778
mklistcopy 49
mkmap 35
normalize 7706844
normalizepol 230891
normalizepol_approx 121198
normalizepol_lg 185467796
padic_to_Fl 77
padic_to_Fp 4165
padicaff0 0
polequal 4185489
polidentical 909462
qtop 14
quadtofp 119
ratval 88368
roughtype 5958433
serequal 287
seridentical 14
sizedigit 7
u_lval 10190884
u_lvalrem 12736305
u_lvalrem_stop 503988424
u_pval 2002
u_pvalrem 388857
vecequal 3496185
vecidentical 4052110
vecindexmax 6661
vecindexmin 19506
vecmax 2581
vecmax0 2728
vecmin 19485
vecmin0 19562
z_lval 351160
z_lvalrem 35
z_pval 42217
z_pvalrem 35

Generated by: LCOV version 1.13