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 29806-4d001396c7) Lines: 1898 2022 93.9 %
Date: 2024-12-22 09:08:28 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 57829141
Q_to_Fp 226838
Qdivii 134839140
Qdivis 1560421
Qdiviu 136306428
Zp_nosquare_m1 42
_serprec 7161978
addQp 4762827
addRc 303859573
addRq 1274
addTp 7
add_intmod_same 3690732
add_rfrac 3039747
add_rfrac_scal 8830966
add_scal 26106524
add_ser_scal 408094
addqf 77
addsub_frac 28647663
addsub_frac_i 14120807
addsub_polmod 7203
addsub_polmod_scal 13426301
addsub_pp 19968266
conj_i 19573166
conjvec 84
divRc 2352697
divTp 3660
div_T_scal 6685060
div_intmod_same 341962
div_polmod_same 36764
div_rfrac 1186775
div_rfrac_pol 271003
div_rfrac_scal 13169
div_scal_T 9267125
div_scal_pol 9257890
div_scal_rfrac 37515
div_scal_ser 18550
div_ser 771510
div_ser_scal 1338593
divcR 23109427
divfq 42
divpT 1204910
divpp 13212569
divqf 63
divrunextu 224075137
fill_ser 5693888
fix_rfrac 248374
gadd 5883722912
gaddsg 270570989
gconj 133181
gdiv 432524996
gdivgs 12932854
gdivgu 54712599
gdivgunextu 814832
ginv 36431089
gmul 8517740765
gmul2n 124673804
gmulsg 229577361
gmulug 124338900
gred_rfrac2 44766283
gred_rfrac_simple 57833391
gsqr 1122269137
gsub 2828555436
gsubsg 3167511
init_ser 5706235
inv_polmod 209315
is_ext_qfr 98
kro_quad 28
mulRc 351163702
mulRc_direct 49
mulRq 2352
mulTp 4982894
mul_gen_rfrac 160886
mul_intmod_same 3005180
mul_polmod 2675106
mul_polmod_same 8563693
mul_polmod_scal 3427266
mul_rfrac 7907310
mul_rfrac_scal 10452363
mul_scal 122125684
mul_self_scal 10542268
mul_ser_scal 316176
mulcIR 11682082
mulcc 273752752
mulcxI 15626843
mulcxmI 3079263
mulcxpowIs 5522319
mulpp 17502591
mulqf 28
mulqq 1106
mulrfrac 37507105
quad_polmod_conj 18326
quad_polmod_mul 5858691
quad_polmod_norm 18326
rfrac_denom_mul_scal 9857237
ser_add 3581388
ser_normalize 7630
setfrac 14927415
sqr_polmod 484415
sqr_ser_part 112731
sub_intmod_same 1158553
transtype 154482632
warn_coercion 105

Generated by: LCOV version 1.16