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.16.2 lcov report (development 29115-f22e516b23) Lines: 1577 1772 89.0 %
Date: 2024-04-19 08:07:09 Functions: 149 158 94.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ZV_lval 0
ZV_lvalrem 0
croak 0
gmaxgs 0
gmings 0
gtranslength 0
is_negative 0
normalizepol_approx 0
padicaff0 0
listcreate_gp 7
listkill 7
sizedigit 7
ctop 14
seridentical 14
lexcmp_s_matvec 21
listsort 21
gmequal_try 28
qtop 28
lexcmp_scal_vecsmall 42
lexcmp_vecsmall_mat 42
lexcmpgs 42
mkmap 49
listpop0 56
mklistcopy 56
closure_identical 70
gtolong 77
intdvd 91
lexcmp_vec_mat 98
gcvtop 126
map_proto_lGL 126
lexcmp_vecsmall_vec 154
cmpgen 161
chk_true_err 189
lexcmp_vecsmall_other 196
matsize 203
quadtofp 252
minval 336
lexcmpsg 343
list_cmp 343
lexcmp_scal_matvec 357
cvstop2 399
z_pvalrem 399
serequal 413
map_proto_G 462
ZV_Z_dvd 539
cmp_str 602
ZX_lvalrem 721
identicalrr 1554
gpvaluation 3808
padic_to_Fp 4466
gen_z_divides 4886
gtolist 5538
mklist 6345
mklist_typ 6401
gen_Z_divides 6592
gen_pvalrem_DC 11441
gmin 12172
mat_test 16268
vecmin 21314
listpop 21917
zx_lval 28924
ZV_pval 32496
listinsert 35014
listinsert0 35028
gequalsg 41664
cx_approx_equal 53397
vecmax 66056
gmax 78995
cmprfrac 81114
z_lvalrem 87341
gpexponent 89599
gaffsg 91812
vecmin0 133391
u_pval 135590
vecindexmin 168048
padic_to_Fl 217442
vecmax0 226124
frac_val 291090
col_test 292411
lexcmp_similar 371977
cvtop 385814
cmpifrac 435395
vecindexmax 502348
ZX_pval 510516
frac_lval 535492
gen_pval 543012
gcmpsg 613747
gaffect 661953
listput0 705215
ZX_lval 745830
listput 756378
gen_2val 772208
ensure_nb 791224
gvaluation 1162848
gen_lval 1278492
z_pval 1306541
r_approx0 1323272
gequalX 1483066
lexcmp 1616062
lexcmp_i 1616062
z_lval 1809313
cx_approx0 1851346
factorial_lval 2021911
Z_pvalrem_DC 2147918
_domul 2201967
u_pvalrem 2391637
gassoc_proto 2413804
gequal_try 3193345
roughtype 3232465
polidentical 3432196
ZX_pvalrem 3823901
ZV_pvalrem 3898598
Q_lvalrem 3902392
Q_pvalrem 3904079
cmpfrac 4386935
gen_2valrem 4744070
glength 5141924
vecidentical 5244589
vecequal 5593072
Q_pval 6333098
Q_lval 6337255
itop2_coprime 6814576
cvtop2 6821014
polequal 7422891
gen_lvalrem 7710409
gen_pvalrem 7722502
cgetp 12416928
normalizeser 13323801
Z_pval 13571644
is_monomial_test 14673206
isless_iu 22508585
Z_lval 24449828
u_lval 30019985
Z_pvalrem 30584397
Z_lvalrem 38210823
map_proto_lG 38864701
cmp_universal_rec 39036361
gabs 49809825
gidentical 61840482
gisexactzero 63703704
gsigne 73714851
gequalm1 74216421
u_lvalrem 74461847
cmp_universal 84044637
normalizepol 95050326
gneg_i 128029058
Z_lvalrem_stop 159463106
gequal 232189277
u_lvalrem_stop 274489086
gcmp 293047627
gequal1 312299642
isexactzero 441596871
gneg 446988448
isrationalzero 537727982
gexpo 645667758
gexpo_safe 645903618
normalizepol_lg 752232262
gequal0 2221391637

Generated by: LCOV version 1.14