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 16358-a11f489) Lines: 1164 1422 81.9 %
Date: 2014-04-11 Functions: 120 137 87.6 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 933 1330 70.2 %

Function Name Sort by function name Hit count Sort by hit count
Q_pval 127405
Q_pvalrem 689
RgX_to_ser 7200
RgX_to_ser_inexact 186895
ZV_Z_dvd 0
ZV_lval 0
ZV_lvalrem 0
ZV_pval 497
ZV_pvalrem 1135
ZX_lval 0
ZX_lvalrem 0
ZX_pval 105
ZX_pvalrem 339293
Z_lval 3390732
Z_lvalrem 4328372
Z_lvalrem_stop 454466952
Z_pval 2853885
Z_pvalrem 2579640
Z_pvalrem_DC 849527
cgetp 32640
closure_identical 10
cmp_str 45
cmp_universal 12595
cmp_universal_rec 3620
cmpfrac 38083
cmpifrac 11637
cmprfrac 28170
col_test 0
croak 0
ctop 10
cvstop2 0
cvtop 7655
cvtop2 37715
ensure_nb 525030
factorial_lval 39405
gabs 4118099
gaffect 215907
gaffsg 620
gassoc_proto 64012
gcmp 89123733
gcmpsg 7125
gcvtop 0
gen_2val 115
gen_2valrem 171054
gen_Z_divides 2700
gen_lval 602
gen_lvalrem 340405
gen_pval 602
gen_pvalrem 340428
gen_pvalrem_DC 4450
gen_z_divides 1770
gequal 11347269
gequal0 216038496
gequal1 99600954
gequalX 46270
gequal_try 1075994
gequalm1 149761
gequalsg 3985
gexpo 35472219
gidentical 1284692
glength 1821600
gmax 5426452
gmaxgs 0
gmin 59873
gmings 0
gneg 107844744
gneg_i 24003903
gpvaluation 2425
greffe_aux 194095
gsigne 1272901
gtolist 220
gtolong 210
gvaluation 8465
identicalrr 15
intdvd 65
is_monomial_test 9390652
is_negative 0
isexactzero 125895477
isless_iu 133978595
isrationalzero 180102973
lexcmp 50082
lexcmp_s_matvec 0
lexcmp_scal_matvec 160
lexcmp_scal_vecsmall 20
lexcmp_similar 18551
lexcmp_vec_mat 60
lexcmp_vecsmall_mat 30
lexcmp_vecsmall_other 80
lexcmp_vecsmall_vec 60
lexcmpgs 20
lexcmpsg 150
listcreate 355
listinsert 25010
listkill 5
listpop 25
listput 500035
listsort 15
map_proto_G 50
map_proto_lG 1005
map_proto_lGL 100
mat_test 0
matsize 65
minval 125
mklistcopy 5
normalize 628020
normalizepol 40834
normalizepol_approx 7891
normalizepol_lg 102529907
padic_to_Fl 45
padic_to_Fp 25
padicaff0 0
polequal 264762
polidentical 19520
qtop 10
quadtofp 75
ratval 4844
rfrac_to_ser 90
roughtype 100314
seridentical 10
sizedigit 10
u_lval 2683671
u_lvalrem 5794658
u_lvalrem_stop 334053696
u_pval 295
u_pvalrem 235675
vecequal 177819
vecidentical 35
vecindexmax 4080
vecindexmin 25
vecmax 770
vecmax0 860
vecmin 5
vecmin0 55
z_lval 680
z_lvalrem 0
z_pval 680
z_pvalrem 0

Generated by: LCOV version 1.9