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 16962-5a32637) Lines: 1178 1428 82.5 %
Date: 2014-10-29 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 299971
Q_pvalrem 4102
RgX_to_ser 12800
RgX_to_ser_inexact 260302
ZV_Z_dvd 0
ZV_lval 0
ZV_lvalrem 0
ZV_pval 693
ZV_pvalrem 1624
ZX_lval 0
ZX_lvalrem 0
ZX_pval 5621
ZX_pvalrem 472220
Z_lval 4882807
Z_lvalrem 6141191
Z_lvalrem_stop 440911229
Z_pval 4177176
Z_pvalrem 3898214
Z_pvalrem_DC 1166855
cgetp 298291
closure_identical 14
cmp_str 63
cmp_universal 51751
cmp_universal_rec 21273
cmpfrac 45792
cmpifrac 14735
cmprfrac 39452
col_test 0
croak 0
ctop 14
cvstop2 0
cvtop 11228
cvtop2 77406
ensure_nb 735042
factorial_lval 54738
gabs 5241685
gaffect 246326
gaffsg 1064
gassoc_proto 72740
gcmp 126971662
gcmpsg 9919
gcvtop 0
gen_2val 161
gen_2valrem 238462
gen_Z_divides 3773
gen_lval 4126
gen_lvalrem 473821
gen_pval 6314
gen_pvalrem 473844
gen_pvalrem_DC 6228
gen_z_divides 2478
gequal 16556658
gequal0 294588022
gequal1 139554431
gequalX 68131
gequal_try 1501960
gequalm1 194749
gequalsg 22435
gexpo 44968308
gidentical 2401667
glength 2586178
gmax 7895601
gmaxgs 0
gmin 84028
gmings 0
gneg 152292828
gneg_i 32636644
gpvaluation 3395
greffe_aux 273102
gsigne 1611181
gtolist 315
gtolong 329
gvaluation 10178
identicalrr 21
intdvd 91
is_monomial_test 12794425
is_negative 0
isexactzero 171098888
isless_iu 147797153
isrationalzero 243474057
lexcmp 59842
lexcmp_s_matvec 0
lexcmp_scal_matvec 224
lexcmp_scal_vecsmall 28
lexcmp_similar 21707
lexcmp_vec_mat 84
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 112
lexcmp_vecsmall_vec 84
lexcmpgs 28
lexcmpsg 210
listcreate 504
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 91
minval 175
mklistcopy 7
normalize 978494
normalizepol 56131
normalizepol_approx 3720
normalizepol_lg 139712313
padic_to_Fl 63
padic_to_Fp 56
padicaff0 0
polequal 372473
polidentical 4992
qtop 14
quadtofp 105
ratval 6902
rfrac_to_ser 126
roughtype 119894
seridentical 14
sizedigit 7
u_lval 3960651
u_lvalrem 8784362
u_lvalrem_stop 314633561
u_pval 693
u_pvalrem 327887
vecequal 345737
vecidentical 91
vecindexmax 5880
vecindexmin 28
vecmax 1127
vecmax0 1253
vecmin 0
vecmin0 70
z_lval 1491
z_lvalrem 0
z_pval 1491
z_pvalrem 0

Generated by: LCOV version 1.9