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 16827-3d78da8) Lines: 1172 1428 82.1 %
Date: 2014-09-29 Functions: 120 137 87.6 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 948 1336 71.0 %

Function Name Sort by function name Hit count Sort by hit count
Q_pval 300188
Q_pvalrem 4102
RgX_to_ser 14840
RgX_to_ser_inexact 260323
ZV_Z_dvd 0
ZV_lval 0
ZV_lvalrem 0
ZV_pval 693
ZV_pvalrem 1624
ZX_lval 0
ZX_lvalrem 0
ZX_pval 147
ZX_pvalrem 474201
Z_lval 4879208
Z_lvalrem 6100092
Z_lvalrem_stop 441821885
Z_pval 4124816
Z_pvalrem 3790642
Z_pvalrem_DC 1166943
cgetp 298347
closure_identical 14
cmp_str 63
cmp_universal 26516
cmp_universal_rec 9128
cmpfrac 45841
cmpifrac 14749
cmprfrac 39473
col_test 0
croak 0
ctop 14
cvstop2 0
cvtop 11214
cvtop2 77469
ensure_nb 735042
factorial_lval 55046
gabs 5267249
gaffect 293263
gaffsg 1064
gassoc_proto 72922
gcmp 126968024
gcmpsg 9975
gcvtop 0
gen_2val 161
gen_2valrem 239120
gen_Z_divides 3773
gen_lval 840
gen_lvalrem 475802
gen_pval 840
gen_pvalrem 475825
gen_pvalrem_DC 6228
gen_z_divides 2478
gequal 16918826
gequal0 295005384
gequal1 139878556
gequalX 65737
gequal_try 1485300
gequalm1 196450
gequalsg 5586
gexpo 45376018
gidentical 1441149
glength 2586175
gmax 7895825
gmaxgs 0
gmin 84581
gmings 0
gneg 152397925
gneg_i 33176427
gpvaluation 3395
greffe_aux 275163
gsigne 1615758
gtolist 315
gtolong 329
gvaluation 12138
identicalrr 21
intdvd 91
is_monomial_test 12796830
is_negative 0
isexactzero 171476703
isless_iu 148479790
isrationalzero 244366435
lexcmp 60031
lexcmp_s_matvec 0
lexcmp_scal_matvec 224
lexcmp_scal_vecsmall 28
lexcmp_similar 21749
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 1407
map_proto_lGL 140
mat_test 0
matsize 98
minval 175
mklistcopy 7
normalize 1001040
normalizepol 56230
normalizepol_approx 11133
normalizepol_lg 139865049
padic_to_Fl 63
padic_to_Fp 56
padicaff0 0
polequal 368273
polidentical 4750
qtop 14
quadtofp 105
ratval 6944
rfrac_to_ser 126
roughtype 120272
seridentical 14
sizedigit 14
u_lval 3964426
u_lvalrem 8754250
u_lvalrem_stop 315017339
u_pval 693
u_pvalrem 329245
vecequal 352772
vecidentical 70
vecindexmax 5887
vecindexmin 35
vecmax 1134
vecmax0 1260
vecmin 7
vecmin0 77
z_lval 1491
z_lvalrem 0
z_pval 1491
z_pvalrem 0

Generated by: LCOV version 1.9