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 16741-1378b1c) Lines: 1165 1422 81.9 %
Date: 2014-08-17 Functions: 120 137 87.6 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 941 1330 70.8 %

Function Name Sort by function name Hit count Sort by hit count
Q_pval 213995
Q_pvalrem 2930
RgX_to_ser 10710
RgX_to_ser_inexact 186895
ZV_Z_dvd 0
ZV_lval 0
ZV_lvalrem 0
ZV_pval 495
ZV_pvalrem 1160
ZX_lval 0
ZX_lvalrem 0
ZX_pval 105
ZX_pvalrem 338656
Z_lval 3512595
Z_lvalrem 4508279
Z_lvalrem_stop 316318770
Z_pval 2973861
Z_pvalrem 2776617
Z_pvalrem_DC 849231
cgetp 203480
closure_identical 10
cmp_str 45
cmp_universal 18940
cmp_universal_rec 6520
cmpfrac 32698
cmpifrac 10445
cmprfrac 28195
col_test 0
croak 0
ctop 10
cvstop2 0
cvtop 8005
cvtop2 51145
ensure_nb 525030
factorial_lval 39300
gabs 3878444
gaffect 215967
gaffsg 620
gassoc_proto 64378
gcmp 90694406
gcmpsg 7125
gcvtop 0
gen_2val 115
gen_2valrem 170731
gen_Z_divides 2695
gen_lval 600
gen_lvalrem 339793
gen_pval 600
gen_pvalrem 339816
gen_pvalrem_DC 4446
gen_z_divides 1770
gequal 11855549
gequal0 214329350
gequal1 100666751
gequalX 46900
gequal_try 1075886
gequalm1 140298
gequalsg 3990
gexpo 33342342
gidentical 1285651
glength 1847250
gmax 5639857
gmaxgs 0
gmin 60294
gmings 0
gneg 108720207
gneg_i 23944141
gpvaluation 2425
greffe_aux 197605
gsigne 1338529
gtolist 225
gtolong 235
gvaluation 8660
identicalrr 15
intdvd 65
is_monomial_test 9390049
is_negative 0
isexactzero 124337484
isless_iu 114405210
isrationalzero 176810456
lexcmp 42677
lexcmp_s_matvec 0
lexcmp_scal_matvec 160
lexcmp_scal_vecsmall 20
lexcmp_similar 15470
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 1005
map_proto_lGL 100
mat_test 0
matsize 70
minval 125
mklistcopy 5
normalize 708650
normalizepol 39920
normalizepol_approx 7899
normalizepol_lg 101077582
padic_to_Fl 45
padic_to_Fp 40
padicaff0 0
polequal 264777
polidentical 19462
qtop 10
quadtofp 75
ratval 4920
rfrac_to_ser 90
roughtype 85504
seridentical 10
sizedigit 10
u_lval 2802134
u_lvalrem 6238497
u_lvalrem_stop 216725642
u_pval 495
u_pvalrem 235133
vecequal 248301
vecidentical 50
vecindexmax 4205
vecindexmin 25
vecmax 810
vecmax0 900
vecmin 5
vecmin0 55
z_lval 1065
z_lvalrem 0
z_pval 1065
z_pvalrem 0

Generated by: LCOV version 1.9