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 - gen1.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.1 lcov report (development 28676-df828f1c94) Lines: 1935 2060 93.9 %
Date: 2023-08-26 07:54:43 Functions: 101 101 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Leading_is_neg 57847854
Q_to_Fp 23405
Qdivii 113925647
Qdivis 1459762
Qdiviu 117233987
Zp_nosquare_m1 42
_serprec 7063586
addQp 3150370
addRc 182632070
addRq 1274
addTp 7
add_intmod_same 3690551
add_rfrac 3039474
add_rfrac_scal 8830973
add_scal 22600637
add_ser_scal 396649
addqf 77
addsub_frac 26511424
addsub_frac_i 12885132
addsub_polmod 2142
addsub_polmod_scal 12876704
addsub_pp 9392287
conj_i 17686251
conjvec 84
divRc 2840820
divTp 3635
div_T_scal 5429007
div_intmod_same 341853
div_polmod_same 35860
div_rfrac 1186656
div_rfrac_pol 270821
div_rfrac_scal 30832
div_scal_T 9267552
div_scal_pol 9258919
div_scal_rfrac 37466
div_scal_ser 18389
div_ser 761864
div_ser_scal 1321422
divcR 19386262
divfq 42
divpT 1265523
divpp 2670899
divqf 63
divrunextu 106634935
fill_ser 5614613
fix_rfrac 248290
gadd 4363547888
gaddsg 287433114
gconj 99236
gdiv 421075670
gdivgs 8695805
gdivgu 43475659
gdivgunextu 804801
ginv 23342422
gmul 7696178277
gmul2n 102369883
gmulsg 245859642
gmulug 133776235
gred_rfrac2 44775647
gred_rfrac_simple 57851998
gsqr 1052371822
gsub 3547111275
gsubsg 3155052
init_ser 5626078
inv_polmod 79932
is_ext_qfr 84
kro_quad 28
mulRc 281901146
mulRc_direct 49
mulRq 2352
mulTp 5751515
mul_gen_rfrac 160865
mul_intmod_same 3102109
mul_polmod 2678207
mul_polmod_same 8073073
mul_polmod_scal 2634128
mul_rfrac 7907114
mul_rfrac_scal 10456218
mul_scal 112337525
mul_ser_scal 307237
mulcIR 11157486
mulcc 255436255
mulcxI 10468799
mulcxmI 198167
mulcxpowIs 268250
mulpp 15219991
mulqf 28
mulqq 1106
mulrfrac 30162770
quad_polmod_conj 18277
quad_polmod_mul 5907659
quad_polmod_norm 18277
rfrac_denom_mul_scal 9890981
ser_add 3532192
ser_normalize 7553
setfrac 13938584
sqr_polmod 67367
sqr_ser_part 104170
sub_intmod_same 1158469
transtype 154527242
warn_coercion 105

Generated by: LCOV version 1.14