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 to exceed 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 23171-a5c0ed393) Lines: 1326 1497 88.6 %
Date: 2018-10-20 05:38:07 Functions: 138 147 93.9 %
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
closure_identical 35
z_lvalrem 35
z_pvalrem 35
ZX_lval 42
lexcmp_scal_vecsmall 42
lexcmp_vecsmall_mat 42
lexcmpgs 42
mkmap 42
listpop0 49
mklistcopy 49
cmpgen 63
gcvtop 70
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 196
minval 231
ZV_Z_dvd 245
serequal 287
list_cmp 336
lexcmpsg 343
lexcmp_scal_matvec 357
gtolist 431
cmp_str 476
mklist 750
mklist_typ 799
gaffsg 1022
gmin 1148
gpexponent 1421
u_pval 2002
col_test 2058
vecmax 2588
gen_z_divides 2695
vecmax0 2735
gpvaluation 3661
padic_to_Fp 4165
gen_Z_divides 4361
gen_2val 5523
vecindexmax 6668
ZV_pval 6685
cmpifrac 6685
gen_pvalrem_DC 7012
ZX_pval 7973
lexcmp_similar 8162
cx_approx_equal 9268
gen_lval 12480
gen_pval 14658
mat_test 16184
vecmin 16923
vecmin0 17000
listpop 21910
gequalsg 25410
listinsert 35028
z_pval 42217
cvtop 46562
vecindexmin 48962
gcmpsg 49020
cmprfrac 64862
cmpfrac 81188
ratval 88368
ZV_pvalrem 106957
gequalm1 112752
factorial_lval 117242
normalizepol_approx 121198
gaffect 198990
gvaluation 204192
normalizepol 237295
cvtop2 274446
_domul 297832
gen_2valrem 304357
gassoc_proto 327378
z_lval 351160
u_pvalrem 388990
Q_pvalrem 432391
ZX_pvalrem 544103
gen_lvalrem 650856
gen_pvalrem 651060
listput0 700063
listput 751051
ensure_nb 786023
polidentical 909462
map_proto_lG 1063501
gequalX 1185016
Z_pvalrem_DC 1354906
Q_pval 1403814
cgetp 1549830
lexcmp 2984134
lexcmp_i 2984134
vecequal 3496185
vecidentical 4052138
polequal 4153674
gsigne 4242541
gequal_try 4938714
glength 4982754
roughtype 5968611
Z_pval 6836333
normalize 7702602
gabs 10144135
u_lval 10191289
Z_lval 10843368
Z_pvalrem 11995481
is_monomial_test 13179381
Z_lvalrem 14302334
u_lvalrem 15984181
cmp_universal_rec 27477101
gidentical 36658036
cmp_universal 48813627
gneg_i 53542913
gisexactzero 56502446
gexpo 124998243
gexpo_safe 125041020
gequal 138477449
gequal1 155266370
gcmp 158468036
normalizepol_lg 181915499
isrationalzero 186845335
isless_iu 191668172
isexactzero 209284904
gneg 211270830
u_lvalrem_stop 537826684
Z_lvalrem_stop 576217764
gequal0 584028704

Generated by: LCOV version 1.13