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 29644-f1a46412a2) Lines: 1936 2061 93.9 %
Date: 2024-10-12 09:06:38 Functions: 101 101 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 7189
ser_normalize 7560
div_rfrac_scal 13169
quad_polmod_conj 18319
quad_polmod_norm 18319
div_scal_ser 18550
div_polmod_same 36232
div_scal_rfrac 37466
sqr_ser_part 112731
gconj 132383
mul_gen_rfrac 160865
inv_polmod 208528
Q_to_Fp 226838
fix_rfrac 248374
div_rfrac_pol 271003
mul_ser_scal 316134
div_intmod_same 341824
add_ser_scal 408038
sqr_polmod 484317
div_ser 771496
gdivgunextu 813628
sub_intmod_same 1158553
div_rfrac 1186663
divpT 1203979
div_ser_scal 1338593
Qdivis 1561201
divRc 2351907
mul_polmod 2675106
add_rfrac 3039726
mulcxmI 3060914
mul_intmod_same 3103375
gsubsg 3166746
mul_polmod_scal 3398811
ser_add 3581388
add_intmod_same 3690649
addQp 4760428
mulTp 4981702
mulcxpowIs 5521715
fill_ser 5693846
init_ser 5706179
quad_polmod_mul 5851950
div_T_scal 6659401
_serprec 7161978
mul_rfrac 7907135
mul_polmod_same 8552227
add_rfrac_scal 8831008
div_scal_pol 9257463
div_scal_T 9266775
rfrac_denom_mul_scal 9857930
mul_rfrac_scal 10453385
mulcIR 11640492
gdivgs 12718203
divpp 13212107
addsub_polmod_scal 13417509
addsub_frac_i 14040149
setfrac 14824020
mulcxI 15532439
mulpp 17470213
conj_i 19331036
addsub_pp 19954433
divcR 23026084
add_scal 26068366
addsub_frac 28455380
ginv 36399353
mulrfrac 37414530
gred_rfrac2 44766640
gdivgu 54706134
Leading_is_neg 57830170
gred_rfrac_simple 57834420
mul_scal 121790330
gmulug 124315870
gmul2n 124570986
Qdivii 133602966
Qdiviu 135097053
transtype 154483885
divrunextu 223253039
gmulsg 229069239
gaddsg 270550661
mulcc 273358425
addRc 303622187
mulRc 350687289
gdiv 431943181
gsqr 1121296598
gsub 2823291973
gadd 5869623191
gmul 8495896203

Generated by: LCOV version 1.16