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 17110-9967e23) Lines: 1178 1428 82.5 %
Date: 2014-11-26 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 223345
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 1335
ZX_lval 0
ZX_lvalrem 0
ZX_pval 4015
ZX_pvalrem 343745
Z_lval 3562284
Z_lvalrem 4533280
Z_lvalrem_stop 319556839
Z_pval 3058605
Z_pvalrem 2871777
Z_pvalrem_DC 878284
cgetp 213175
closure_identical 10
cmp_str 45
cmp_universal 37005
cmp_universal_rec 15215
cmpfrac 35213
cmpifrac 10935
cmprfrac 28200
col_test 0
croak 0
ctop 10
cvstop2 0
cvtop 8030
cvtop2 55410
ensure_nb 525030
factorial_lval 39613
gabs 3885480
gaffect 183644
gaffsg 760
gassoc_proto 53100
gcmp 87780932
gcmpsg 23203
gcvtop 0
gen_2val 115
gen_2valrem 172180
gen_Z_divides 2735
gen_lval 2916
gen_lvalrem 345057
gen_pval 4510
gen_pvalrem 345080
gen_pvalrem_DC 4505
gen_z_divides 1790
gequal 12758170
gequal0 216872925
gequal1 100989575
gequalX 49560
gequal_try 1088082
gequalm1 144834
gequalsg 16025
gexpo 33926062
gidentical 1715286
glength 1860249
gmax 5652601
gmaxgs 0
gmin 48661
gmings 0
gneg 107970239
gneg_i 23909150
gpvaluation 2425
greffe_aux 195065
gsigne 1282683
gtolist 225
gtolong 2323
gvaluation 7265
identicalrr 15
intdvd 65
is_monomial_test 9357653
is_negative 0
isexactzero 125234666
isless_iu 115034531
isrationalzero 175915426
lexcmp 48169
lexcmp_s_matvec 0
lexcmp_scal_matvec 160
lexcmp_scal_vecsmall 20
lexcmp_similar 17980
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 40121
normalizepol_approx 2664
normalizepol_lg 102442662
padic_to_Fl 45
padic_to_Fp 40
padicaff0 0
polequal 269334
polidentical 3476
qtop 10
quadtofp 75
ratval 5455
rfrac_to_ser 90
roughtype 96488
seridentical 10
sizedigit 5
u_lval 2909324
u_lvalrem 6377884
u_lvalrem_stop 219407798
u_pval 495
u_pvalrem 239020
vecequal 249825
vecidentical 65
vecindexmax 5067
vecindexmin 20
vecmax 929
vecmax0 1019
vecmin 0
vecmin0 50
z_lval 34444
z_lvalrem 0
z_pval 1065
z_pvalrem 0

Generated by: LCOV version 1.9