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.18.1 lcov report (development 29950-285c5b69ed) Lines: 1898 2022 93.9 %
Date: 2025-02-05 09:09:51 Functions: 102 102 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 98
warn_coercion 105
mulqq 1106
addRq 1274
mulRq 2310
divTp 3660
addsub_polmod 7203
ser_normalize 7644
div_rfrac_scal 13162
quad_polmod_conj 18340
quad_polmod_norm 18340
div_scal_ser 18550
div_polmod_same 37058
div_scal_rfrac 37515
sqr_ser_part 112731
gconj 133207
mul_gen_rfrac 160872
fix_rfrac 207774
inv_polmod 209563
Q_to_Fp 226838
div_rfrac_pol 262512
mul_ser_scal 316190
div_intmod_same 341938
add_ser_scal 408094
sqr_polmod 484268
div_ser 771510
gdivgunextu 814832
sub_intmod_same 1053721
div_rfrac 1186733
divpT 1204910
div_ser_scal 1338593
Qdivis 1561445
divRc 2356681
mul_polmod 2674917
mul_intmod_same 2713858
add_rfrac 3018187
mulcxmI 3078651
gsubsg 3167933
mul_polmod_scal 3418182
add_intmod_same 3550129
ser_add 3581388
addQp 4762853
mulTp 4982903
mulcxpowIs 5524373
fill_ser 5693888
init_ser 5706235
quad_polmod_mul 5860048
div_T_scal 6687459
_serprec 7161978
mul_rfrac 7907548
mul_polmod_same 8564160
add_rfrac_scal 8811856
div_scal_pol 9260578
div_scal_T 9269813
rfrac_denom_mul_scal 9857748
mul_rfrac_scal 10416075
mul_self_scal 10542846
mulcIR 11655321
gdivgs 12936751
divpp 13212647
addsub_polmod_scal 13420661
addsub_frac_i 13610329
setfrac 14431799
mulcxI 15635303
mulpp 17503179
conj_i 19576746
addsub_pp 19969007
divcR 23116351
add_scal 26120010
addsub_frac 27338385
ginv 36365513
mulrfrac 37511337
gred_rfrac2 44726971
gdivgu 54714984
Leading_is_neg 57697219
gred_rfrac_simple 57701455
mul_scal 122213430
gmul2n 124109684
gmulug 124339796
Qdivii 131747507
Qdiviu 133090859
transtype 154146758
divrunextu 224268099
gmulsg 229511015
gaddsg 270571969
mulcc 273697771
addRc 303919810
mulRc 351128219
gdiv 432529189
gsqr 1119533852
gsub 2826045166
gadd 5872871103
gmul 8512239049

Generated by: LCOV version 1.16