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 29999-b543a28f59) Lines: 1884 2008 93.8 %
Date: 2025-02-16 09:14:14 Functions: 103 103 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Leading_is_neg 57698003
Q_to_Fp 226838
Qdivii 132223990
Qdivis 1561466
Qdiviu 133555711
Zp_nosquare_m1 42
_serprec 7161978
addQp 4762876
addRc 303930415
addRq 1274
addTp 7
add_intmod_same 3550140
add_rfrac 3018187
add_rfrac_scal 8811856
add_scal 44605909
add_ser_scal 408094
addqf 77
addsub_frac 27380005
addsub_frac_i 13621797
addsub_polmod 7203
addsub_polmod_scal 13421935
addsub_pp 19967947
conj_i 19577874
conjvec 84
divRc 2357044
divTp 3660
div_T_scal 6696542
div_intmod_same 341942
div_polmod_same 37345
div_rfrac 1186733
div_rfrac_pol 262512
div_rfrac_scal 13162
div_scal_T 9271962
div_scal_pol 9263796
div_scal_rfrac 37515
div_scal_ser 18550
div_ser 771510
div_ser_scal 1338593
divcR 23121960
divfq 42
divpT 1204910
divpp 13212609
divqf 63
divrunextu 224324895
fill_ser 5693888
fix_rfrac 207774
gadd 6050633711
gaddsg 270572875
gconj 133235
gdiv 432708089
gdivgs 12938009
gdivgu 54715808
gdivgunextu 814832
ginv 36374019
gmul 8682275545
gmul2n 133223516
gmulsg 229528299
gmulug 124340547
gred_rfrac2 44760431
gred_rfrac_simple 57702239
gsqr 1168142973
gsub 2847069225
gsubsg 3167953
init_ser 5706235
inv_polmod 210032
is_ext_qfr 98
kro_quad 28
mkpadic_mod 24588988
mulRc 351076927
mulRc_direct 49
mulRq 2310
mulTp 4982910
mul_gen_rfrac 160872
mul_intmod_same 2835606
mul_polmod 2674917
mul_polmod_same 8566099
mul_polmod_scal 3429403
mul_rfrac 7907688
mul_rfrac_scal 10416649
mul_scal 150271620
mul_self_scal 7461263
mul_ser_scal 316204
mulcIR 11659736
mulcc 273771774
mulcxI 15641798
mulcxmI 3078694
mulcxpowIs 5524838
mulpp 17503163
mulqf 28
mulqq 1106
mulrfrac 37511080
quad_polmod_conj 18340
quad_polmod_mul 5860776
quad_polmod_norm 18340
rfrac_denom_mul_scal 9857748
ser_add 3581388
ser_normalize 7658
setfrac 14447328
sqr_polmod 484275
sqr_ser_part 112731
sub_intmod_same 1053721
transtype 154190368
warn_coercion 105

Generated by: LCOV version 1.16