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.0 lcov report (development 29792-e7296d7d08) Lines: 1898 2022 93.9 %
Date: 2024-12-05 09:09:40 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 2352
divTp 3660
addsub_polmod 7203
ser_normalize 7630
div_rfrac_scal 13169
quad_polmod_conj 18326
quad_polmod_norm 18326
div_scal_ser 18550
div_polmod_same 36764
div_scal_rfrac 37515
sqr_ser_part 112731
gconj 133181
mul_gen_rfrac 160886
inv_polmod 209317
Q_to_Fp 226838
fix_rfrac 248374
div_rfrac_pol 271003
mul_ser_scal 316176
div_intmod_same 341964
add_ser_scal 408094
sqr_polmod 484415
div_ser 771510
gdivgunextu 814552
sub_intmod_same 1158553
div_rfrac 1186775
divpT 1204910
div_ser_scal 1338593
Qdivis 1560428
divRc 2352670
mul_polmod 2675106
mul_intmod_same 3005203
add_rfrac 3039747
mulcxmI 3079362
gsubsg 3167486
mul_polmod_scal 3427238
ser_add 3581388
add_intmod_same 3690733
addQp 4762872
mulTp 4982894
mulcxpowIs 5524084
fill_ser 5693888
init_ser 5706235
quad_polmod_mul 5858691
div_T_scal 6684995
_serprec 7161978
mul_rfrac 7907310
mul_polmod_same 8562573
add_rfrac_scal 8830966
div_scal_pol 9257890
div_scal_T 9267125
rfrac_denom_mul_scal 9857237
mul_rfrac_scal 10452363
mul_self_scal 10542359
mulcIR 11682047
gdivgs 12932867
divpp 13212137
addsub_polmod_scal 13425153
addsub_frac_i 14115685
setfrac 14921658
mulcxI 15627401
mulpp 17502794
conj_i 19572822
addsub_pp 19968884
divcR 23109710
add_scal 26105032
addsub_frac 28640424
ginv 36432205
mulrfrac 37510904
gred_rfrac2 44766283
gdivgu 54713126
Leading_is_neg 57829141
gred_rfrac_simple 57833391
mul_scal 122126642
gmulug 124338900
gmul2n 124662497
Qdivii 134835266
Qdiviu 136305028
transtype 154482632
divrunextu 224328053
gmulsg 229511809
gaddsg 270570293
mulcc 273773748
addRc 303890888
mulRc 351214560
gdiv 432521117
gsqr 1122310403
gsub 2828345364
gadd 5884005335
gmul 8517538209

Generated by: LCOV version 1.16