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 17587-9bb49d9) Lines: 1252 1432 87.4 %
Date: 2015-03-03 Functions: 123 137 89.8 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1050 1348 77.9 %

Function Name Sort by function name Hit count Sort by hit count
Q_pval 319897
Q_pvalrem 4102
RgX_to_ser 14077
RgX_to_ser_inexact 260309
ZV_Z_dvd 49
ZV_lval 0
ZV_lvalrem 0
ZV_pval 959
ZV_pvalrem 1974
ZX_lval 0
ZX_lvalrem 0
ZX_pval 5474
ZX_pvalrem 482153
Z_lval 5034189
Z_lvalrem 6673078
Z_lvalrem_stop 481434931
Z_pval 4328298
Z_pvalrem 4371025
Z_pvalrem_DC 1207134
cgetp 932012
closure_identical 28
cmp_str 84
cmp_universal 800737
cmp_universal_rec 45780
cmpfrac 50408
cmpifrac 15445
cmprfrac 39207
col_test 84
croak 0
ctop 14
cvstop2 0
cvtop 11462
cvtop2 126404
ensure_nb 735042
factorial_lval 55592
gabs 5759395
gaffect 246326
gaffsg 1064
gassoc_proto 78576
gcmp 126844831
gcmpsg 24044
gcvtop 0
gen_2val 301
gen_2valrem 241437
gen_Z_divides 3850
gen_lval 4245
gen_lvalrem 484097
gen_pval 6433
gen_pvalrem 484127
gen_pvalrem_DC 6332
gen_z_divides 2506
gequal 27981600
gequal0 320746607
gequal1 141594053
gequalX 70042
gequal_try 1567614
gequalm1 218827
gequalsg 22435
gexpo 50578252
gidentical 2629004
glength 2605424
gmax 7885739
gmaxgs 0
gmin 67491
gmings 0
gneg 153976361
gneg_i 35490139
gpvaluation 3416
greffe_aux 274386
gsigne 1664559
gtolist 399
gtolong 77
gvaluation 10213
identicalrr 21
intdvd 91
is_monomial_test 12772421
is_negative 0
isexactzero 175399617
isless_iu 173897717
isrationalzero 259808170
lexcmp 71186
lexcmp_s_matvec 21
lexcmp_scal_matvec 224
lexcmp_scal_vecsmall 28
lexcmp_similar 26654
lexcmp_vec_mat 84
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 182
lexcmp_vecsmall_vec 154
lexcmpgs 28
lexcmpsg 329
listcreate 602
listinsert 35014
listkill 7
listpop 35
listput 700049
listsort 21
map_proto_G 175
map_proto_lG 3485653
map_proto_lGL 126
mat_test 98
matsize 105
minval 175
mklistcopy 49
normalize 979004
normalizepol 76992
normalizepol_approx 3746
normalizepol_lg 150584871
padic_to_Fl 63
padic_to_Fp 56
padicaff0 0
polequal 346203
polidentical 11443
qtop 14
quadtofp 105
ratval 8444
rfrac_to_ser 126
roughtype 142701
seridentical 14
sizedigit 7
u_lval 4176832
u_lvalrem 9805644
u_lvalrem_stop 345164728
u_pval 693
u_pvalrem 335097
vecequal 425236
vecidentical 112
vecindexmax 5331
vecindexmin 28
vecmax 1251
vecmax0 1377
vecmin 0
vecmin0 70
z_lval 48222
z_lvalrem 0
z_pval 1491
z_pvalrem 0

Generated by: LCOV version 1.9