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.12.0 lcov report (development 22872-edcf83abb) Lines: 1322 1495 88.4 %
Date: 2018-07-20 05:36:03 Functions: 137 146 93.8 %
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
gmax 7
listcreate_gp 7
listkill 7
sizedigit 7
ctop 14
qtop 14
seridentical 14
identicalrr 21
lexcmp_s_matvec 21
listsort 21
lexcmp_scal_vecsmall 28
lexcmpgs 28
closure_identical 35
listpop0 35
mkmap 35
z_lvalrem 35
z_pvalrem 35
ZX_lval 42
lexcmp_vecsmall_mat 42
mklistcopy 49
cmpgen 63
gcvtop 70
gpexponent 77
gtolong 77
padic_to_Fl 77
intdvd 91
lexcmp_vec_mat 98
matsize 119
quadtofp 119
map_proto_lGL 126
map_proto_G 140
lexcmp_vecsmall_vec 154
lexcmp_vecsmall_other 182
minval 231
ZV_Z_dvd 245
lexcmp_scal_matvec 245
serequal 287
lexcmpsg 329
list_cmp 336
gtolist 417
cmp_str 476
mklist 736
mklist_typ 778
gaffsg 1022
gmin 1141
u_pval 2002
col_test 2058
vecmax 2574
gen_z_divides 2695
vecmax0 2721
gpvaluation 3661
padic_to_Fp 4165
gen_Z_divides 4361
gen_2val 5523
cmpifrac 5852
vecindexmax 6654
ZV_pval 6685
gen_pvalrem_DC 7012
ZX_pval 7973
lexcmp_similar 8036
cx_approx_equal 9268
gen_lval 12480
gen_pval 14658
mat_test 16184
vecmin 19485
vecindexmin 19506
vecmin0 19562
listpop 21910
gequalsg 25592
listinsert 35014
cmprfrac 35952
gcmpsg 40018
z_pval 42217
cvtop 46557
factorial_lval 67897
cmpfrac 80166
ratval 88368
ZV_pvalrem 106957
gequalm1 111184
normalizepol_approx 121198
gvaluation 204192
normalizepol 230830
gaffect 245948
cvtop2 274302
_domul 297993
gen_2valrem 304063
gassoc_proto 327450
z_lval 351161
u_pvalrem 388815
Q_pvalrem 432247
ZX_pvalrem 543277
gen_lvalrem 650030
gen_pvalrem 650234
listput0 700224
listput 751226
ensure_nb 786198
polidentical 909462
gequalX 1184967
Z_pvalrem_DC 1354886
Q_pval 1404031
cgetp 1549696
map_proto_lG 1971034
gequal_try 2289634
lexcmp 2979052
vecequal 3496185
gsigne 3566816
vecidentical 4052110
polequal 4185489
glength 4562705
roughtype 5958433
Z_pvalrem 6012031
Z_pval 6836676
normalize 7706830
Z_lvalrem 8319009
gabs 9943120
u_lval 10190771
Z_lval 10843690
u_lvalrem 12735951
is_monomial_test 13176393
cmp_universal_rec 27144986
gidentical 36657708
gneg_i 42272540
cmp_universal 48136923
gisexactzero 53548356
gexpo 104277173
gexpo_safe 104319208
gequal 139235628
gequal1 154866687
gcmp 156621774
normalizepol_lg 185465822
isless_iu 187396452
gneg 209044362
isexactzero 218041126
isrationalzero 231646502
u_lvalrem_stop 503931234
gequal0 566485234
Z_lvalrem_stop 571162428

Generated by: LCOV version 1.13