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
Q_pval 1403814
Q_pvalrem 432391
ZV_Z_dvd 245
ZV_lval 0
ZV_lvalrem 0
ZV_pval 6685
ZV_pvalrem 106957
ZX_lval 42
ZX_lvalrem 0
ZX_pval 7973
ZX_pvalrem 544103
Z_lval 10843368
Z_lvalrem 14302334
Z_lvalrem_stop 576217764
Z_pval 6836333
Z_pvalrem 11995481
Z_pvalrem_DC 1354906
_domul 297832
cgetp 1549830
closure_identical 35
cmp_str 476
cmp_universal 48813627
cmp_universal_rec 27477101
cmpfrac 81188
cmpgen 63
cmpifrac 6685
cmprfrac 64862
col_test 2058
croak 0
ctop 14
cvstop2 0
cvtop 46562
cvtop2 274446
cx_approx_equal 9268
ensure_nb 786023
factorial_lval 117242
gabs 10144135
gaffect 198990
gaffsg 1022
gassoc_proto 327378
gcmp 158468036
gcmpsg 49020
gcvtop 70
gen_2val 5523
gen_2valrem 304357
gen_Z_divides 4361
gen_lval 12480
gen_lvalrem 650856
gen_pval 14658
gen_pvalrem 651060
gen_pvalrem_DC 7012
gen_z_divides 2695
gequal 138477449
gequal0 584028704
gequal1 155266370
gequalX 1185016
gequal_try 4938714
gequalm1 112752
gequalsg 25410
gexpo 124998243
gexpo_safe 125041020
gidentical 36658036
gisexactzero 56502446
glength 4982754
gmax 7
gmaxgs 0
gmin 1148
gmings 0
gneg 211270830
gneg_i 53542913
gpexponent 1421
gpvaluation 3661
gsigne 4242541
gtolist 431
gtolong 77
gvaluation 204192
identicalrr 21
intdvd 91
is_monomial_test 13179381
is_negative 0
isexactzero 209284904
isless_iu 191668172
isrationalzero 186845335
lexcmp 2984134
lexcmp_i 2984134
lexcmp_s_matvec 21
lexcmp_scal_matvec 357
lexcmp_scal_vecsmall 42
lexcmp_similar 8162
lexcmp_vec_mat 98
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 196
lexcmp_vecsmall_vec 154
lexcmpgs 42
lexcmpsg 343
list_cmp 336
listcreate_gp 7
listinsert 35028
listkill 7
listpop 21910
listpop0 49
listput 751051
listput0 700063
listsort 21
map_proto_G 140
map_proto_lG 1063501
map_proto_lGL 126
mat_test 16184
matsize 119
minval 231
mklist 750
mklist_typ 799
mklistcopy 49
mkmap 42
normalize 7702602
normalizepol 237295
normalizepol_approx 121198
normalizepol_lg 181915499
padic_to_Fl 77
padic_to_Fp 4165
padicaff0 0
polequal 4153674
polidentical 909462
qtop 14
quadtofp 119
ratval 88368
roughtype 5968611
serequal 287
seridentical 14
sizedigit 7
u_lval 10191289
u_lvalrem 15984181
u_lvalrem_stop 537826684
u_pval 2002
u_pvalrem 388990
vecequal 3496185
vecidentical 4052138
vecindexmax 6668
vecindexmin 48962
vecmax 2588
vecmax0 2735
vecmin 16923
vecmin0 17000
z_lval 351160
z_lvalrem 35
z_pval 42217
z_pvalrem 35

Generated by: LCOV version 1.13