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-bordeaux1.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.8.0 lcov report (development 16912-212c0f0) Lines: 1178 1428 82.5 %
Date: 2014-10-20 Functions: 119 137 86.9 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 952 1336 71.3 %

Function Name Sort by function name Hit count Sort by hit count
Q_pval 300022
Q_pvalrem 4102
RgX_to_ser 12796
RgX_to_ser_inexact 260302
ZV_Z_dvd 0
ZV_lval 0
ZV_lvalrem 0
ZV_pval 693
ZV_pvalrem 1624
ZX_lval 0
ZX_lvalrem 0
ZX_pval 5621
ZX_pvalrem 472258
Z_lval 4879805
Z_lvalrem 6112954
Z_lvalrem_stop 441109105
Z_pval 4174264
Z_pvalrem 3891397
Z_pvalrem_DC 1166855
cgetp 298291
closure_identical 14
cmp_str 63
cmp_universal 32921
cmp_universal_rec 12311
cmpfrac 45792
cmpifrac 14725
cmprfrac 39452
col_test 0
croak 0
ctop 14
cvstop2 0
cvtop 11214
cvtop2 77406
ensure_nb 735042
factorial_lval 54743
gabs 5234453
gaffect 246508
gaffsg 1092
gassoc_proto 71052
gcmp 126963294
gcmpsg 9919
gcvtop 0
gen_2val 161
gen_2valrem 238500
gen_Z_divides 3773
gen_lval 4126
gen_lvalrem 473859
gen_pval 6314
gen_pvalrem 473882
gen_pvalrem_DC 6228
gen_z_divides 2478
gequal 16509642
gequal0 294226933
gequal1 139512425
gequalX 68113
gequal_try 1485146
gequalm1 194629
gequalsg 5635
gexpo 44959500
gidentical 1442268
glength 2586175
gmax 7895480
gmaxgs 0
gmin 84212
gmings 0
gneg 152282588
gneg_i 32986577
gpvaluation 3395
greffe_aux 273098
gsigne 1604796
gtolist 315
gtolong 329
gvaluation 10178
identicalrr 21
intdvd 91
is_monomial_test 12784112
is_negative 0
isexactzero 171141434
isless_iu 147797153
isrationalzero 243511062
lexcmp 59842
lexcmp_s_matvec 0
lexcmp_scal_matvec 224
lexcmp_scal_vecsmall 28
lexcmp_similar 21707
lexcmp_vec_mat 84
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 112
lexcmp_vecsmall_vec 84
lexcmpgs 28
lexcmpsg 210
listcreate 504
listinsert 35014
listkill 7
listpop 35
listput 700049
listsort 21
map_proto_G 175
map_proto_lG 1400
map_proto_lGL 126
mat_test 0
matsize 91
minval 175
mklistcopy 7
normalize 975404
normalizepol 56020
normalizepol_approx 3720
normalizepol_lg 139601149
padic_to_Fl 63
padic_to_Fp 56
padicaff0 0
polequal 372508
polidentical 4992
qtop 14
quadtofp 105
ratval 6902
rfrac_to_ser 126
roughtype 119894
seridentical 14
sizedigit 7
u_lval 3959053
u_lvalrem 8763285
u_lvalrem_stop 314826990
u_pval 693
u_pvalrem 327931
vecequal 345702
vecidentical 70
vecindexmax 5880
vecindexmin 28
vecmax 1127
vecmax0 1253
vecmin 0
vecmin0 70
z_lval 1491
z_lvalrem 0
z_pval 1491
z_pvalrem 0

Generated by: LCOV version 1.9