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

Generated by: LCOV version 1.14