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 23339-b1c33c51a) Lines: 1322 1497 88.3 %
Date: 2018-12-11 05:41:34 Functions: 137 147 93.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_pval 1416784
Q_pvalrem 436587
ZV_Z_dvd 245
ZV_lval 0
ZV_lvalrem 0
ZV_pval 6916
ZV_pvalrem 114587
ZX_lval 42
ZX_lvalrem 0
ZX_pval 7973
ZX_pvalrem 557336
Z_lval 10928479
Z_lvalrem 14390018
Z_lvalrem_stop 577502667
Z_pval 6921295
Z_pvalrem 12078341
Z_pvalrem_DC 1358640
_domul 610543
cgetp 1580262
closure_identical 35
cmp_str 476
cmp_universal 48843480
cmp_universal_rec 27486405
cmpfrac 81370
cmpgen 63
cmpifrac 6706
cmprfrac 64862
col_test 2058
croak 0
ctop 14
cvstop2 0
cvtop 47605
cvtop2 278781
cx_approx_equal 9268
ensure_nb 786023
factorial_lval 120609
gabs 10359516
gaffect 199239
gaffsg 1022
gassoc_proto 556829
gcmp 159471575
gcmpsg 56384
gcvtop 70
gen_2val 5642
gen_2valrem 313110
gen_Z_divides 4368
gen_lval 12711
gen_lvalrem 671719
gen_pval 14889
gen_pvalrem 671923
gen_pvalrem_DC 7026
gen_z_divides 2702
gequal 214218052
gequal0 618285115
gequal1 155454573
gequalX 1191172
gequal_try 4952875
gequalm1 112752
gequalsg 39382
gexpo 127868927
gexpo_safe 127911459
gidentical 36856848
gisexactzero 56330295
glength 4982824
gmax 7
gmaxgs 0
gmin 1155
gmings 0
gneg 212181132
gneg_i 48761062
gpexponent 1421
gpvaluation 3675
gsigne 4294576
gtolist 431
gtolong 77
gvaluation 204283
identicalrr 21
intdvd 91
is_monomial_test 13192372
is_negative 0
isexactzero 167339567
isless_iu 193718059
isrationalzero 196827826
lexcmp 3129677
lexcmp_i 3129677
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 2206783
map_proto_lGL 126
mat_test 16184
matsize 119
minval 231
mklist 750
mklist_typ 799
mklistcopy 49
mkmap 42
normalize 7712451
normalizepol 237996
normalizepol_approx 0
normalizepol_lg 202676951
padic_to_Fl 77
padic_to_Fp 4165
padicaff0 0
polequal 9205307
polidentical 931219
qtop 14
quadtofp 119
ratval 92813
roughtype 6259697
serequal 294
seridentical 14
sizedigit 7
u_lval 10387425
u_lvalrem 16261809
u_lvalrem_stop 537274005
u_pval 2002
u_pvalrem 396854
vecequal 5065697
vecidentical 4053097
vecindexmax 6759
vecindexmin 48976
vecmax 2679
vecmax0 2826
vecmin 16937
vecmin0 17014
z_lval 351427
z_lvalrem 35
z_pval 42427
z_pvalrem 35

Generated by: LCOV version 1.13