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 23694-b3ccec097) Lines: 1322 1497 88.3 %
Date: 2019-03-20 05:44:21 Functions: 137 147 93.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_pval 1426182
Q_pvalrem 436648
ZV_Z_dvd 245
ZV_lval 0
ZV_lvalrem 0
ZV_pval 6958
ZV_pvalrem 121440
ZX_lval 42
ZX_lvalrem 0
ZX_pval 7973
ZX_pvalrem 586659
Z_lval 11037076
Z_lvalrem 14466842
Z_lvalrem_stop 583271558
Z_pval 7029322
Z_pvalrem 12143492
Z_pvalrem_DC 1364039
_domul 625628
cgetp 1580323
closure_identical 35
cmp_str 476
cmp_universal 48851005
cmp_universal_rec 27488477
cmpfrac 83827
cmpgen 63
cmpifrac 6902
cmprfrac 64862
col_test 2058
croak 0
ctop 14
cvstop2 0
cvtop 47607
cvtop2 278862
cx_approx_equal 9331
ensure_nb 786275
factorial_lval 125001
gabs 11209254
gaffect 199239
gaffsg 1022
gassoc_proto 573499
gcmp 158682839
gcmpsg 60178
gcvtop 70
gen_2val 5642
gen_2valrem 323085
gen_Z_divides 4410
gen_lval 12753
gen_lvalrem 707895
gen_pval 14931
gen_pvalrem 708099
gen_pvalrem_DC 7082
gen_z_divides 2716
gequal 214931080
gequal0 630633894
gequal1 155667447
gequalX 1194133
gequal_try 4953638
gequalm1 112836
gequalsg 39382
gexpo 136498460
gexpo_safe 136541272
gidentical 56219750
gisexactzero 56334131
glength 4983085
gmax 7
gmaxgs 0
gmin 1169
gmings 0
gneg 216199501
gneg_i 49501206
gpexponent 4781
gpvaluation 3675
gsigne 4321463
gtolist 627
gtolong 77
gvaluation 204374
identicalrr 21
intdvd 91
is_monomial_test 13208450
is_negative 0
isexactzero 168382522
isless_iu 196993815
isrationalzero 199087438
lexcmp 3129719
lexcmp_i 3129719
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 751429
listput0 700266
listsort 21
map_proto_G 140
map_proto_lG 965954
map_proto_lGL 126
mat_test 16184
matsize 119
minval 231
mklist 1345
mklist_typ 1401
mklistcopy 49
mkmap 49
normalize 7716259
normalizepol 256736
normalizepol_approx 0
normalizepol_lg 204992966
padic_to_Fl 77
padic_to_Fp 4165
padicaff0 0
polequal 9211071
polidentical 3434044
qtop 14
quadtofp 119
ratval 93772
roughtype 6259781
serequal 294
seridentical 14
sizedigit 7
u_lval 10975974
u_lvalrem 17007871
u_lvalrem_stop 539750353
u_pval 2002
u_pvalrem 413682
vecequal 5059866
vecidentical 4055330
vecindexmax 6766
vecindexmin 49053
vecmax 2686
vecmax0 2833
vecmin 17014
vecmin0 17091
z_lval 351433
z_lvalrem 63
z_pval 42427
z_pvalrem 63

Generated by: LCOV version 1.13