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 16624-25b9976) Lines: 1165 1422 81.9 %
Date: 2014-06-24 Functions: 120 137 87.6 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 939 1330 70.6 %

Function Name Sort by function name Hit count Sort by hit count
Q_pval 226733
Q_pvalrem 3014
RgX_to_ser 10500
RgX_to_ser_inexact 186895
ZV_Z_dvd 0
ZV_lval 0
ZV_lvalrem 0
ZV_pval 497
ZV_pvalrem 1163
ZX_lval 0
ZX_lvalrem 0
ZX_pval 105
ZX_pvalrem 339017
Z_lval 3565767
Z_lvalrem 4521516
Z_lvalrem_stop 331258190
Z_pval 3027397
Z_pvalrem 2775782
Z_pvalrem_DC 849510
cgetp 203470
closure_identical 10
cmp_str 45
cmp_universal 18940
cmp_universal_rec 6520
cmpfrac 37837
cmpifrac 11871
cmprfrac 28187
col_test 0
croak 0
ctop 10
cvstop2 0
cvtop 8005
cvtop2 51135
ensure_nb 525030
factorial_lval 39351
gabs 3938476
gaffect 215967
gaffsg 620
gassoc_proto 64388
gcmp 89340300
gcmpsg 7125
gcvtop 0
gen_2val 115
gen_2valrem 170976
gen_Z_divides 2700
gen_lval 602
gen_lvalrem 340157
gen_pval 602
gen_pvalrem 340180
gen_pvalrem_DC 4450
gen_z_divides 1770
gequal 11695430
gequal0 214751660
gequal1 100738168
gequalX 46876
gequal_try 1076035
gequalm1 142638
gequalsg 3990
gexpo 33779460
gidentical 1285997
glength 1847234
gmax 5426793
gmaxgs 0
gmin 60125
gmings 0
gneg 107819035
gneg_i 23976695
gpvaluation 2425
greffe_aux 197395
gsigne 1349578
gtolist 225
gtolong 235
gvaluation 8660
identicalrr 15
intdvd 65
is_monomial_test 9390212
is_negative 0
isexactzero 124594796
isless_iu 117147798
isrationalzero 177034042
lexcmp 56875
lexcmp_s_matvec 0
lexcmp_scal_matvec 160
lexcmp_scal_vecsmall 20
lexcmp_similar 21763
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 716885
normalizepol 41074
normalizepol_approx 7891
normalizepol_lg 101245389
padic_to_Fl 45
padic_to_Fp 40
padicaff0 0
polequal 264787
polidentical 19520
qtop 10
quadtofp 75
ratval 4942
rfrac_to_ser 90
roughtype 113900
seridentical 10
sizedigit 10
u_lval 2839190
u_lvalrem 6248831
u_lvalrem_stop 228908196
u_pval 495
u_pvalrem 235449
vecequal 249549
vecidentical 50
vecindexmax 4180
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