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 30347-cb65b7994e) Lines: 1869 1991 93.9 %
Date: 2025-06-27 09:22:08 Functions: 104 104 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Leading_is_neg 57792533
Q_to_Fp 226838
Qdivii 142718866
Qdivis 1591260
Qdiviu 143845373
Zp_nosquare_m1 42
_serprec 7162062
addQp 4762979
addRc 304838861
addRq 1288
addTp 7
add_intmod_same 3344809
add_rfrac 3018271
add_rfrac_scal 8811954
add_scal 45422633
add_ser_scal 408206
addqf 77
addsub_frac 42585269
addsub_frac_i 14222503
addsub_polmod 7203
addsub_polmod_scal 13497276
addsub_pp 19971763
conj_i 29195174
conjvec 84
divRc 2358585
divRq 301
divTp 3674
div_T_scal 7116455
div_intmod_same 341923
div_polmod_same 37289
div_rfrac 1187237
div_rfrac_pol 262344
div_rfrac_scal 32139
div_scal_T 9264727
div_scal_pol 9257030
div_scal_rfrac 37767
div_scal_ser 18550
div_ser 771538
div_ser_scal 1338593
divcR 23098031
divfq 42
divpT 1204917
divpp 13212116
divqf 63
divrunextu 224192210
fill_ser 5693993
fix_rfrac 207739
gadd 6092378215
gaddsg 270600777
gconj 133221
gdiv 437029627
gdivgs 13124054
gdivgu 54662374
gdivgunextu 1583873
ginv 36597275
gmul 8790895369
gmul2n 138463371
gmulsg 231440948
gmulug 124385884
gred_rfrac2 44825298
gred_rfrac_simple 57796601
gsqr 1179217861
gsub 2872059512
gsubsg 3109771
init_ser 5706368
inv_polmod 210388
is_ext_qfr 98
kro_quad 35
mkpadic_mod 24592550
mulRc 351429789
mulRq 2324
mulTp 4984898
mul_gen_rfrac 161432
mul_intmod_same 2629097
mul_polmod 2674945
mul_polmod_same 8568715
mul_polmod_scal 3384676
mul_rfrac 7910285
mul_rfrac_scal 10454828
mul_scal 157300755
mul_self_scal 7546197
mul_ser_scal 316386
mulcIR 11668283
mulcc 274356580
mulcxI 15655510
mulcxmI 3079089
mulcxpowIs 5527148
mulpp 17502991
mulqf 28
mulqq 1127
mulrfrac 37596434
quad_polmod_conj 18389
quad_polmod_mul 5860097
quad_polmod_norm 18389
rfrac_denom_mul_scal 9959372
ser_add 3581430
ser_normalize 7658
setfrac 15036306
sqr_polmod 484275
sqr_ser_part 112759
sqrq 70
sub_intmod_same 1027929
transtype 154401254
warn_coercion 105

Generated by: LCOV version 1.16