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 21348-d75f58f) Lines: 1357 1546 87.8 %
Date: 2017-11-20 06:21:05 Functions: 140 151 92.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ZV_lval 0
ZV_lvalrem 0
ZX_lvalrem 0
croak 0
cvstop2 0
gmaxgs 0
gmings 0
is_negative 0
padicaff0 0
z_lvalrem 0
z_pvalrem 0
listcreate_gp 7
listkill 7
sizedigit 7
ctop 14
qtop 14
seridentical 14
identicalrr 21
lexcmp_s_matvec 21
listsort 21
ZX_lval 28
closure_identical 28
gcvtop 28
lexcmp_scal_vecsmall 28
lexcmpgs 28
listpop0 35
mkmap 35
cmpgen 42
lexcmp_vecsmall_mat 42
mklistcopy 49
gpexponent 63
gtolong 77
padic_to_Fl 77
lexcmp_vec_mat 84
intdvd 91
matsize 112
quadtofp 112
rfracrecip_to_ser_absolute 112
map_proto_lGL 126
lexcmp_vecsmall_vec 154
lexcmp_vecsmall_other 182
map_proto_G 182
ZV_Z_dvd 217
lexcmp_scal_matvec 224
rfrac_to_ser 224
minval 231
serequal 308
lexcmpsg 329
list_cmp 336
gtolist 418
cmp_str 476
mklist 745
mklist_typ 787
gaffsg 1008
col_test 2023
u_pval 2072
vecmax 2476
gen_z_divides 2541
vecmax0 2623
gpvaluation 3661
gen_2val 3920
gen_Z_divides 3962
padic_to_Fp 4193
ZX_pval 6307
ZV_pval 6454
gen_pvalrem_DC 6466
vecindexmax 6556
vecmin 8348
vecindexmin 8369
vecmin0 8425
cx_approx_equal 9471
gen_lval 10615
lexcmp_similar 10829
cmpifrac 10871
gen_pval 12761
mat_test 16184
listpop 21910
gcmpsg 24394
gequalsg 25375
listinsert 35014
cmprfrac 35812
cmpfrac 40546
z_pval 42009
cvtop 46791
normalizepol_approx 60942
factorial_lval 66539
ratval 84350
gmin 92168
ZV_pvalrem 106747
normalizepol 160671
gvaluation 198525
gaffect 245878
_domul 277932
cvtop2 281394
gassoc_proto 282560
gen_2valrem 299443
z_lval 345350
RgX_to_ser_inexact 351443
u_pvalrem 383467
Q_pvalrem 438105
ZX_pvalrem 535542
gen_lvalrem 642253
gen_pvalrem 642289
listput0 700049
RgX_to_ser 733224
listput 751051
ensure_nb 786023
polidentical 879866
gequalX 1043938
greffe_aux 1084660
gequalm1 1226378
Z_pvalrem_DC 1365150
Q_pval 1392749
cgetp 1559592
polequal 2163812
gequal_try 2272251
lexcmp 2926041
vecequal 3414167
gsigne 3415515
vecidentical 3879421
glength 4532512
normalize 5413946
roughtype 5852411
Z_pvalrem 6031312
Z_pval 6740358
gmax 7832420
Z_lvalrem 8327244
gabs 9267563
u_lval 10005485
Z_lval 10748421
u_lvalrem 12619928
is_monomial_test 13147879
map_proto_lG 20842999
cmp_universal_rec 26166301
gidentical 35276361
gneg_i 40012040
cmp_universal 45608388
gisexactzero 48213645
gexpo 86591402
gexpo_safe 86627473
gequal 115610257
gequal1 154374692
isless_iu 171507983
gcmp 179828143
normalizepol_lg 181281289
gneg 192046184
isexactzero 209659436
isrationalzero 218465078
u_lvalrem_stop 390775199
Z_lvalrem_stop 446282120
gequal0 516478252

Generated by: LCOV version 1.11