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-bordeaux.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.10.0 lcov report (development 21188-db834f2) Lines: 1351 1541 87.7 %
Date: 2017-10-20 06:23:07 Functions: 138 149 92.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_pval 1392811
Q_pvalrem 439685
RgX_to_ser 718944
RgX_to_ser_inexact 350750
ZV_Z_dvd 217
ZV_lval 0
ZV_lvalrem 0
ZV_pval 6454
ZV_pvalrem 107055
ZX_lval 28
ZX_lvalrem 0
ZX_pval 6307
ZX_pvalrem 535017
Z_lval 10721743
Z_lvalrem 7688306
Z_lvalrem_stop 446322765
Z_pval 6713846
Z_pvalrem 5388371
Z_pvalrem_DC 1364646
_domul 579968
cgetp 1560936
closure_identical 28
cmp_str 476
cmp_universal 45606477
cmp_universal_rec 26165601
cmpfrac 39832
cmpgen 42
cmpifrac 10857
cmprfrac 35763
col_test 2023
croak 0
ctop 14
cvstop2 0
cvtop 46796
cvtop2 281949
cx_approx_equal 9471
ensure_nb 786023
factorial_lval 66343
gabs 9247469
gaffect 245878
gaffsg 1008
gassoc_proto 708685
gcmp 186372304
gcmpsg 24184
gcvtop 28
gen_2val 3920
gen_2valrem 299163
gen_Z_divides 3962
gen_lval 10615
gen_lvalrem 642036
gen_pval 12761
gen_pvalrem 642072
gen_pvalrem_DC 6466
gen_z_divides 2541
gequal 183966250
gequal0 540008144
gequal1 153970768
gequalX 1043973
gequal_try 2269662
gequalm1 1208248
gequalsg 25389
gexpo 85474330
gidentical 33930931
gisexactzero 48217845
glength 4529978
gmax 7832420
gmaxgs 0
gmin 91494
gmings 0
gneg 189570354
gneg_i 42530028
gpvaluation 3661
greffe_aux 1069680
gsigne 3270780
gtolist 418
gtolong 77
gvaluation 199650
identicalrr 21
intdvd 91
is_monomial_test 13148609
is_negative 0
isexactzero 207144472
isless_iu 171519735
isrationalzero 217285301
lexcmp 2923626
lexcmp_s_matvec 21
lexcmp_scal_matvec 224
lexcmp_scal_vecsmall 28
lexcmp_similar 10829
lexcmp_vec_mat 84
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 182
lexcmp_vecsmall_vec 154
lexcmpgs 28
lexcmpsg 329
list_cmp 336
listcreate_gp 7
listinsert 35014
listkill 7
listpop 21910
listpop0 35
listput 751051
listput0 700049
listsort 21
map_proto_G 182
map_proto_lG 20890801
map_proto_lGL 126
mat_test 16184
matsize 112
minval 231
mklist 745
mklist_typ 787
mklistcopy 49
mkmap 35
normalize 5328343
normalizepol 120159
normalizepol_approx 60942
normalizepol_lg 188823565
padic_to_Fl 77
padic_to_Fp 4193
padicaff0 0
polequal 6289901
polidentical 661019
qtop 14
quadtofp 112
ratval 84343
rfrac_to_ser 224
rfracrecip_to_ser_absolute 112
roughtype 5847581
serequal 308
seridentical 14
sizedigit 7
u_lval 10131021
u_lvalrem 12208779
u_lvalrem_stop 390618410
u_pval 2072
u_pvalrem 383012
vecequal 3411828
vecidentical 3656135
vecindexmax 6479
vecindexmin 8243
vecmax 2385
vecmax0 2525
vecmin 8215
vecmin0 8285
z_lval 345327
z_lvalrem 0
z_pval 42476
z_pvalrem 0

Generated by: LCOV version 1.11