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 29877-9124a6ce27) Lines: 1898 2022 93.9 %
Date: 2025-01-18 09:08:44 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 7644
div_rfrac_scal 13162
quad_polmod_conj 18340
quad_polmod_norm 18340
div_scal_ser 18550
div_polmod_same 37058
div_scal_rfrac 37515
sqr_ser_part 112731
gconj 133207
mul_gen_rfrac 160872
fix_rfrac 207774
inv_polmod 209582
Q_to_Fp 226838
div_rfrac_pol 262512
mul_ser_scal 316190
div_intmod_same 341932
add_ser_scal 408094
sqr_polmod 484625
div_ser 771510
gdivgunextu 814832
sub_intmod_same 1053623
div_rfrac 1186733
divpT 1204910
div_ser_scal 1338593
Qdivis 1560557
divRc 2353528
mul_polmod 2675106
mul_intmod_same 2715884
add_rfrac 3018187
mulcxmI 3079399
gsubsg 3167604
mul_polmod_scal 3433944
add_intmod_same 3550367
ser_add 3581388
addQp 4762807
mulTp 4982653
mulcxpowIs 5524142
fill_ser 5693888
init_ser 5706235
quad_polmod_mul 5859664
div_T_scal 6687888
_serprec 7161978
mul_rfrac 7907240
mul_polmod_same 8565842
add_rfrac_scal 8811856
div_scal_pol 9257890
div_scal_T 9267125
rfrac_denom_mul_scal 9852575
mul_rfrac_scal 10410650
mul_self_scal 10542736
mulcIR 11660939
gdivgs 12935694
divpp 13212531
addsub_polmod_scal 13428800
addsub_frac_i 13611591
setfrac 14433027
mulcxI 15634885
mulpp 17502535
conj_i 19576606
addsub_pp 19968365
divcR 23119729
add_scal 26121235
addsub_frac 27339359
ginv 36366234
mulrfrac 37510592
gred_rfrac2 44713664
gdivgu 54714130
Leading_is_neg 57690023
gred_rfrac_simple 57694273
mul_scal 122140257
gmul2n 124090889
gmulug 124339796
Qdivii 131711371
Qdiviu 133054691
transtype 154107908
divrunextu 224180406
gmulsg 229458327
gaddsg 270572095
mulcc 273700479
addRc 303905364
mulRc 350967749
gdiv 432489512
gsqr 1119335977
gsub 2828095373
gadd 5873619899
gmul 8512793618

Generated by: LCOV version 1.16