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 17097-9391e68) Lines: 1178 1428 82.5 %
Date: 2014-11-21 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 216460
Q_pvalrem 2930
RgX_to_ser 9135
RgX_to_ser_inexact 185930
ZV_Z_dvd 0
ZV_lval 0
ZV_lvalrem 0
ZV_pval 495
ZV_pvalrem 1160
ZX_lval 0
ZX_lvalrem 0
ZX_pval 4015
ZX_pvalrem 343385
Z_lval 3509598
Z_lvalrem 4504836
Z_lvalrem_stop 316444404
Z_pval 3005929
Z_pvalrem 2869710
Z_pvalrem_DC 878254
cgetp 213175
closure_identical 10
cmp_str 45
cmp_universal 37005
cmp_universal_rec 15215
cmpfrac 33058
cmpifrac 10555
cmprfrac 28185
col_test 0
croak 0
ctop 10
cvstop2 0
cvtop 8030
cvtop2 55410
ensure_nb 525030
factorial_lval 39573
gabs 3836416
gaffect 183644
gaffsg 760
gassoc_proto 52564
gcmp 87856137
gcmpsg 7085
gcvtop 0
gen_2val 115
gen_2valrem 172085
gen_Z_divides 2735
gen_lval 2916
gen_lvalrem 344522
gen_pval 4510
gen_pvalrem 344545
gen_pvalrem_DC 4505
gen_z_divides 1790
gequal 12729141
gequal0 216189074
gequal1 100923666
gequalX 49535
gequal_try 1087893
gequalm1 143409
gequalsg 16025
gexpo 33499519
gidentical 1715286
glength 1860245
gmax 5658795
gmaxgs 0
gmin 86207
gmings 0
gneg 107847225
gneg_i 23907047
gpvaluation 2425
greffe_aux 195065
gsigne 1266800
gtolist 225
gtolong 1500
gvaluation 7265
identicalrr 15
intdvd 65
is_monomial_test 9357628
is_negative 0
isexactzero 125117338
isless_iu 114615217
isrationalzero 175766337
lexcmp 42959
lexcmp_s_matvec 0
lexcmp_scal_matvec 160
lexcmp_scal_vecsmall 20
lexcmp_similar 15580
lexcmp_vec_mat 60
lexcmp_vecsmall_mat 30
lexcmp_vecsmall_other 80
lexcmp_vecsmall_vec 60
lexcmpgs 20
lexcmpsg 150
listcreate 360
listinsert 25010
listkill 5
listpop 25
listput 500035
listsort 15
map_proto_G 125
map_proto_lG 1000
map_proto_lGL 90
mat_test 0
matsize 65
minval 125
mklistcopy 5
normalize 697005
normalizepol 40101
normalizepol_approx 2664
normalizepol_lg 102309960
padic_to_Fl 45
padic_to_Fp 40
padicaff0 0
polequal 269334
polidentical 3476
qtop 10
quadtofp 75
ratval 4955
rfrac_to_ser 90
roughtype 86068
seridentical 10
sizedigit 5
u_lval 2863317
u_lvalrem 6354377
u_lvalrem_stop 216708597
u_pval 495
u_pvalrem 238865
vecequal 247515
vecidentical 65
vecindexmax 7291
vecindexmin 20
vecmax 899
vecmax0 989
vecmin 0
vecmin0 50
z_lval 34444
z_lvalrem 0
z_pval 1065
z_pvalrem 0

Generated by: LCOV version 1.9