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.16.2 lcov report (development 29419-8afb0ed749) Lines: 1935 2060 93.9 %
Date: 2024-07-02 09:03:41 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
addsub_polmod 2142
mulRq 2352
divTp 3660
ser_normalize 7560
div_rfrac_scal 13169
quad_polmod_conj 18319
quad_polmod_norm 18319
div_scal_ser 18550
div_polmod_same 36211
div_scal_rfrac 37466
sqr_ser_part 112381
gconj 132039
mul_gen_rfrac 160865
inv_polmod 208551
Q_to_Fp 226838
fix_rfrac 248325
div_rfrac_pol 271003
mul_ser_scal 316148
div_intmod_same 341826
add_ser_scal 408031
sqr_polmod 484338
div_ser 771146
gdivgunextu 813628
sub_intmod_same 1158553
div_rfrac 1186656
divpT 1203979
div_ser_scal 1338593
Qdivis 1560285
divRc 2349811
mul_polmod 2678214
add_rfrac 3039495
mul_intmod_same 3103485
mulcxmI 3142129
gsubsg 3184670
mul_polmod_scal 3440650
ser_add 3581038
add_intmod_same 3690641
addQp 4760489
mulTp 4981702
mulcxpowIs 5522526
fill_ser 5693629
init_ser 5705822
div_T_scal 5745952
quad_polmod_mul 5908349
_serprec 7161278
mul_rfrac 7907128
mul_polmod_same 8630564
add_rfrac_scal 8830994
div_scal_pol 9256385
div_scal_T 9265697
rfrac_denom_mul_scal 9857076
mul_rfrac_scal 10453385
mulcIR 11632548
gdivgs 12911388
divpp 13210320
addsub_polmod_scal 13516530
addsub_frac_i 14037502
setfrac 14819498
mulcxI 15554058
mulpp 17470492
conj_i 19339942
addsub_pp 19953360
add_scal 22904065
divcR 23100646
addsub_frac 28492759
ginv 36123127
mulrfrac 37483235
gred_rfrac2 44766507
gdivgu 54702249
Leading_is_neg 57828812
gred_rfrac_simple 57833139
mul_scal 117004378
gmulug 124315520
gmul2n 124697258
Qdivii 130638873
Qdiviu 133124978
transtype 154479832
divrunextu 223706192
gmulsg 227338834
gaddsg 270574882
mulcc 273473874
addRc 304442776
mulRc 356295460
gdiv 425634450
gsqr 1122409161
gsub 2801012474
gadd 5805329181
gmul 8426602843

Generated by: LCOV version 1.16