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

Generated by: LCOV version 1.16