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.10.0 lcov report (development 21501-1931cb9) Lines: 1357 1546 87.8 %
Date: 2017-12-16 06:20:36 Functions: 140 151 92.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_pval 1392994
Q_pvalrem 425330
RgX_to_ser 734575
RgX_to_ser_inexact 351443
ZV_Z_dvd 217
ZV_lval 0
ZV_lvalrem 0
ZV_pval 6454
ZV_pvalrem 106747
ZX_lval 28
ZX_lvalrem 0
ZX_pval 6363
ZX_pvalrem 535542
Z_lval 10797388
Z_lvalrem 8302255
Z_lvalrem_stop 445072091
Z_pval 6789876
Z_pvalrem 6005974
Z_pvalrem_DC 1365150
_domul 278114
cgetp 1546253
closure_identical 28
cmp_str 476
cmp_universal 47888659
cmp_universal_rec 27347362
cmpfrac 83407
cmpgen 42
cmpifrac 13104
cmprfrac 35861
col_test 2023
croak 0
ctop 14
cvstop2 0
cvtop 46507
cvtop2 267802
cx_approx_equal 9268
ensure_nb 786023
factorial_lval 66525
gabs 9269691
gaffect 245878
gaffsg 1008
gassoc_proto 286764
gcmp 146701893
gcmpsg 26291
gcvtop 28
gen_2val 3920
gen_2valrem 299443
gen_Z_divides 3962
gen_lval 10671
gen_lvalrem 642253
gen_pval 12817
gen_pvalrem 642289
gen_pvalrem_DC 6466
gen_z_divides 2541
gequal 115843031
gequal0 516619212
gequal1 153428000
gequalX 1044050
gequal_try 2272482
gequalm1 101191
gequalsg 25417
gexpo 86610053
gexpo_safe 86646404
gidentical 36132891
gisexactzero 48221182
glength 4532894
gmax 7832420
gmaxgs 0
gmin 92168
gmings 0
gneg 195320835
gneg_i 40506043
gpexponent 63
gpvaluation 3661
greffe_aux 1086011
gsigne 3423957
gtolist 410
gtolong 77
gvaluation 198686
identicalrr 21
intdvd 91
is_monomial_test 13142762
is_negative 0
isexactzero 210604027
isless_iu 169448098
isrationalzero 220735430
lexcmp 2926041
lexcmp_s_matvec 21
lexcmp_scal_matvec 224
lexcmp_scal_vecsmall 28
lexcmp_similar 10829
lexcmp_vec_mat 84
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 751051
listput0 700049
listsort 21
map_proto_G 182
map_proto_lG 3582072
map_proto_lGL 126
mat_test 16184
matsize 112
minval 231
mklist 729
mklist_typ 771
mklistcopy 49
mkmap 35
normalize 5923392
normalizepol 149022
normalizepol_approx 60942
normalizepol_lg 177488820
padic_to_Fl 77
padic_to_Fp 4207
padicaff0 0
polequal 2165639
polidentical 902882
qtop 14
quadtofp 112
ratval 84686
rfrac_to_ser 224
rfracrecip_to_ser_absolute 112
roughtype 5852411
serequal 315
seridentical 14
sizedigit 7
u_lval 10040633
u_lvalrem 12627518
u_lvalrem_stop 394732213
u_pval 2002
u_pvalrem 383488
vecequal 3414594
vecidentical 4170082
vecindexmax 6556
vecindexmin 9188
vecmax 2476
vecmax0 2623
vecmin 9167
vecmin0 9244
z_lval 347093
z_lvalrem 0
z_pval 41841
z_pvalrem 0

Generated by: LCOV version 1.11