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 18906-a425091) Lines: 1316 1500 87.7 %
Date: 2016-05-06 Functions: 132 144 91.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1114 1421 78.4 %

Function Name Sort by function name Hit count Sort by hit count
Q_pval 266313
Q_pvalrem 154882
RgX_to_ser 825847
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 523243
Z_lval 5279836
Z_lvalrem 6775579
Z_lvalrem_stop 475950565
Z_pval 4587717
Z_pvalrem 4546217
Z_pvalrem_DC 1171154
_domul 74779
cgetp 1005927
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 28565
cvtop2 186982
ensure_nb 785799
factorial_lval 64691
gabs 7640124
gaffect 246200
gaffsg 980
gassoc_proto 104473
gcmp 143958872
gcmpsg 24408
gcvtop 0
gen_2val 336
gen_2valrem 266497
gen_Z_divides 3878
gen_lval 5127
gen_lvalrem 527624
gen_pval 7273
gen_pvalrem 527660
gen_pvalrem_DC 6389
gen_z_divides 2534
gequal 50167344
gequal0 396446709
gequal1 143914950
gequalX 163706
gequal_try 1702108
gequalm1 1161902
gequalsg 23079
gexpo 65358211
gidentical 7457226
glength 4076009
gmax 7830131
gmaxgs 0
gmin 89565
gmings 0
gneg 182607152
gneg_i 39092133
gpvaluation 3416
greffe_aux 1165082
gsigne 2741342
gtolist 410
gtolong 77
gvaluation 12026
identicalrr 21
intdvd 91
is_monomial_test 13087571
is_negative 0
isexactzero 189952825
isless_iu 169442500
isrationalzero 303272302
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 3713907
map_proto_lGL 126
mat_test 98
matsize 112
minval 224
mklistcopy 49
normalize 5465828
normalizepol 98185
normalizepol_approx 3494
normalizepol_lg 167801645
padic_to_Fl 77
padic_to_Fp 56
padicaff0 0
polequal 367268
polidentical 21089
qtop 14
quadtofp 112
ratval 56168
rfrac_to_ser 133
roughtype 148323
serequal 287
seridentical 14
sizedigit 7
u_lval 4457867
u_lvalrem 9963774
u_lvalrem_stop 354716237
u_pval 101374
u_pvalrem 376383
vecequal 604748
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