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 30146-7dee4152cd) Lines: 1886 2010 93.8 %
Date: 2025-04-19 09:18:32 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 57792505
Q_to_Fp 226838
Qdivii 140089428
Qdivis 1583914
Qdiviu 141418953
Zp_nosquare_m1 42
_serprec 7162062
addQp 4762886
addRc 303895763
addRq 1274
addTp 7
add_intmod_same 3344728
add_rfrac 3018187
add_rfrac_scal 8811947
add_scal 44425880
add_ser_scal 408094
addqf 77
addsub_frac 41397457
addsub_frac_i 13628635
addsub_polmod 7203
addsub_polmod_scal 13420017
addsub_pp 19968085
conj_i 19575380
conjvec 84
divRc 2358690
divTp 3660
div_T_scal 6722509
div_intmod_same 341894
div_polmod_same 37051
div_rfrac 1187237
div_rfrac_pol 262344
div_rfrac_scal 32139
div_scal_T 9264713
div_scal_pol 9257016
div_scal_rfrac 37767
div_scal_ser 18550
div_ser 771510
div_ser_scal 1338593
divcR 23089634
divfq 42
divpT 1204910
divpp 13212766
divqf 63
divrunextu 224090078
fill_ser 5693909
fix_rfrac 207774
gadd 6071565217
gaddsg 270568229
gconj 133221
gdiv 433778077
gdivgs 12965953
gdivgu 54604290
gdivgunextu 1036796
ginv 36300926
gmul 8773778800
gmul2n 137365841
gmulsg 230351595
gmulug 124340568
gred_rfrac2 44825333
gred_rfrac_simple 57796559
gsqr 1178173713
gsub 2856030092
gsubsg 3109610
init_ser 5706256
inv_polmod 209843
is_ext_qfr 98
kro_quad 28
mkpadic_mod 24589538
mulRc 351155407
mulRc_direct 49
mulRq 2310
mulTp 4982907
mul_gen_rfrac 161432
mul_intmod_same 2629064
mul_polmod 2674875
mul_polmod_same 8559433
mul_polmod_scal 3387749
mul_rfrac 7910285
mul_rfrac_scal 10454870
mul_scal 155743753
mul_self_scal 7465286
mul_ser_scal 316218
mulcIR 11666177
mulcc 273823403
mulcxI 15648311
mulcxmI 3079027
mulcxpowIs 5527031
mulpp 17503156
mulqf 28
mulqq 1106
mulrfrac 37584107
quad_polmod_conj 18340
quad_polmod_mul 5860734
quad_polmod_norm 18340
rfrac_denom_mul_scal 9959428
ser_add 3581430
ser_normalize 7658
setfrac 14437288
sqr_polmod 484233
sqr_ser_part 112759
sub_intmod_same 1027922
transtype 154401254
warn_coercion 105

Generated by: LCOV version 1.16