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 17238-ce76349) Lines: 1187 1428 83.1 %
Date: 2014-12-20 Functions: 120 137 87.6 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 957 1336 71.6 %

Function Name Sort by function name Hit count Sort by hit count
Q_pval 318484
Q_pvalrem 4102
RgX_to_ser 13937
RgX_to_ser_inexact 260302
ZV_Z_dvd 7
ZV_lval 0
ZV_lvalrem 0
ZV_pval 847
ZV_pvalrem 1946
ZX_lval 0
ZX_lvalrem 0
ZX_pval 5621
ZX_pvalrem 484715
Z_lval 5029232
Z_lvalrem 6265225
Z_lvalrem_stop 449646546
Z_pval 4323240
Z_pvalrem 3957254
Z_pvalrem_DC 1207170
cgetp 298459
closure_identical 14
cmp_str 63
cmp_universal 312305
cmp_universal_rec 35434
cmpfrac 49607
cmpifrac 15372
cmprfrac 39207
col_test 0
croak 0
ctop 14
cvstop2 0
cvtop 11242
cvtop2 77588
ensure_nb 735042
factorial_lval 55970
gabs 5598378
gaffect 246326
gaffsg 1064
gassoc_proto 79248
gcmp 123138373
gcmpsg 23582
gcvtop 0
gen_2val 245
gen_2valrem 242599
gen_Z_divides 3829
gen_lval 4280
gen_lvalrem 486638
gen_pval 6468
gen_pvalrem 486661
gen_pvalrem_DC 6311
gen_z_divides 2506
gequal 27585620
gequal0 309566190
gequal1 140137741
gequalX 70077
gequal_try 1510663
gequalm1 212170
gequalsg 22435
gexpo 48758459
gidentical 2401650
glength 2605358
gmax 7885508
gmaxgs 0
gmin 67125
gmings 0
gneg 152742287
gneg_i 35106006
gpvaluation 3395
greffe_aux 274239
gsigne 1634121
gtolist 315
gtolong 70
gvaluation 10171
identicalrr 21
intdvd 91
is_monomial_test 12817525
is_negative 0
isexactzero 174664678
isless_iu 151645305
isrationalzero 248705054
lexcmp 69859
lexcmp_s_matvec 0
lexcmp_scal_matvec 224
lexcmp_scal_vecsmall 28
lexcmp_similar 26187
lexcmp_vec_mat 84
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 112
lexcmp_vecsmall_vec 84
lexcmpgs 28
lexcmpsg 210
listcreate 518
listinsert 35014
listkill 7
listpop 35
listput 700049
listsort 21
map_proto_G 175
map_proto_lG 1400
map_proto_lGL 126
mat_test 0
matsize 105
minval 175
mklistcopy 7
normalize 981853
normalizepol 69096
normalizepol_approx 3746
normalizepol_lg 145990844
padic_to_Fl 63
padic_to_Fp 56
padicaff0 0
polequal 401782
polidentical 4858
qtop 14
quadtofp 105
ratval 8386
rfrac_to_ser 126
roughtype 139928
seridentical 14
sizedigit 7
u_lval 4167543
u_lvalrem 9029240
u_lvalrem_stop 319811478
u_pval 693
u_pvalrem 336966
vecequal 379340
vecidentical 91
vecindexmax 5191
vecindexmin 28
vecmax 1223
vecmax0 1349
vecmin 0
vecmin0 70
z_lval 48222
z_lvalrem 0
z_pval 1491
z_pvalrem 0

Generated by: LCOV version 1.9