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 30007-407ab607e8) Lines: 1884 2008 93.8 %
Date: 2025-02-20 09:19:49 Functions: 103 103 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 7658
div_rfrac_scal 13162
quad_polmod_conj 18340
quad_polmod_norm 18340
div_scal_ser 18550
div_polmod_same 37093
div_scal_rfrac 37515
sqr_ser_part 112731
gconj 133221
mul_gen_rfrac 160872
fix_rfrac 207774
inv_polmod 209970
Q_to_Fp 226838
div_rfrac_pol 262512
mul_ser_scal 316204
div_intmod_same 341953
add_ser_scal 408094
sqr_polmod 484275
div_ser 771510
gdivgunextu 814832
sub_intmod_same 1053721
div_rfrac 1186733
divpT 1204910
div_ser_scal 1338593
Qdivis 1561460
divRc 2359590
mul_polmod 2674917
mul_intmod_same 2835620
add_rfrac 3018187
mulcxmI 3078601
gsubsg 3167908
mul_polmod_scal 3428803
add_intmod_same 3550162
ser_add 3581388
addQp 4762840
mulTp 4982891
mulcxpowIs 5523305
fill_ser 5693888
init_ser 5706235
quad_polmod_mul 5860776
div_T_scal 6699084
_serprec 7161978
mul_self_scal 7461481
mul_rfrac 7907688
mul_polmod_same 8565277
add_rfrac_scal 8811856
div_scal_pol 9263796
div_scal_T 9271962
rfrac_denom_mul_scal 9857748
mul_rfrac_scal 10416649
mulcIR 11678560
gdivgs 12939092
divpp 13212439
addsub_polmod_scal 13420752
addsub_frac_i 13627919
setfrac 14436436
mulcxI 15646849
mulpp 17503127
conj_i 19580806
addsub_pp 19967876
divcR 23127244
mkpadic_mod 24588895
ginv 36378906
mulrfrac 37512324
addsub_frac 41392356
add_scal 44613503
gred_rfrac2 44760431
gdivgu 54715402
Leading_is_neg 57698003
gred_rfrac_simple 57702239
gmulug 124340552
gmul2n 133236613
Qdivii 139158347
Qdiviu 140490494
mul_scal 150281774
transtype 154190368
divrunextu 224241532
gmulsg 230018144
gaddsg 270572847
mulcc 273901989
addRc 304015676
mulRc 351606680
gdiv 432738777
gsqr 1175347917
gsub 2847703338
gadd 6075329170
gmul 8756297879

Generated by: LCOV version 1.16