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.8.0 lcov report (development 18953-2660f45) Lines: 1322 1500 88.1 %
Date: 2016-05-30 Functions: 133 144 92.4 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1118 1421 78.7 %

Function Name Sort by function name Hit count Sort by hit count
Q_pval 265711
Q_pvalrem 155146
RgX_to_ser 825882
RgX_to_ser_inexact 339319
ZV_Z_dvd 49
ZV_lval 0
ZV_lvalrem 0
ZV_pval 966
ZV_pvalrem 4417
ZX_lval 28
ZX_lvalrem 0
ZX_pval 6307
ZX_pvalrem 523278
Z_lval 5276714
Z_lvalrem 6786668
Z_lvalrem_stop 476916801
Z_pval 4584595
Z_pvalrem 4551763
Z_pvalrem_DC 1171228
_domul 74779
cgetp 1006199
closure_identical 28
cmp_str 196
cmp_universal 40914412
cmp_universal_rec 23544906
cmpfrac 53575
cmpgen 42
cmpifrac 15533
cmprfrac 35777
col_test 84
croak 0
ctop 14
cvstop2 0
cvtop 28586
cvtop2 187260
ensure_nb 785799
factorial_lval 64698
gabs 7638170
gaffect 246200
gaffsg 980
gassoc_proto 104473
gcmp 143840198
gcmpsg 24408
gcvtop 21
gen_2val 336
gen_2valrem 266497
gen_Z_divides 3878
gen_lval 5127
gen_lvalrem 527659
gen_pval 7273
gen_pvalrem 527695
gen_pvalrem_DC 6389
gen_z_divides 2534
gequal 50164114
gequal0 397028047
gequal1 144002813
gequalX 173624
gequal_try 1719331
gequalm1 1162355
gequalsg 23079
gexpo 65391875
gidentical 27591347
glength 4076053
gmax 7830131
gmaxgs 0
gmin 89572
gmings 0
gneg 182633839
gneg_i 39117650
gpvaluation 3416
greffe_aux 1165117
gsigne 2741520
gtolist 410
gtolong 77
gvaluation 12040
identicalrr 21
intdvd 91
is_monomial_test 13089445
is_negative 0
isexactzero 197786007
isless_iu 170354202
isrationalzero 304251182
lexcmp 73997
lexcmp_s_matvec 21
lexcmp_scal_matvec 224
lexcmp_scal_vecsmall 28
lexcmp_similar 27958
lexcmp_vec_mat 84
lexcmp_vecsmall_mat 42
lexcmp_vecsmall_other 182
lexcmp_vecsmall_vec 154
lexcmpgs 28
lexcmpsg 329
list_cmp 336
listcreate 687
listcreate_typ 722
listinsert 35014
listkill 7
listpop 21910
listpop0 35
listput 750827
listput0 700049
listsort 21
map_proto_G 182
map_proto_lG 3490697
map_proto_lGL 126
mat_test 98
matsize 112
minval 224
mklistcopy 49
normalize 5465975
normalizepol 98682
normalizepol_approx 3501
normalizepol_lg 168148146
padic_to_Fl 77
padic_to_Fp 56
padicaff0 0
polequal 339568
polidentical 763356
qtop 14
quadtofp 112
ratval 56168
rfrac_to_ser 133
roughtype 148323
serequal 294
seridentical 14
sizedigit 7
u_lval 4454612
u_lvalrem 9971631
u_lvalrem_stop 354773353
u_pval 101374
u_pvalrem 376418
vecequal 608948
vecidentical 1232910
vecindexmax 5716
vecindexmin 5457
vecmax 1622
vecmax0 1762
vecmin 5429
vecmin0 5499
z_lval 71799
z_lvalrem 0
z_pval 1988
z_pvalrem 0

Generated by: LCOV version 1.9