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 29464-65cd88daf0) Lines: 1936 2061 93.9 %
Date: 2024-07-23 09:03:50 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 132038
mul_gen_rfrac 160865
inv_polmod 208553
Q_to_Fp 226838
fix_rfrac 248325
div_rfrac_pol 271003
mul_ser_scal 316148
div_intmod_same 341803
add_ser_scal 408045
sqr_polmod 484317
div_ser 771146
gdivgunextu 813628
sub_intmod_same 1158553
div_rfrac 1186656
divpT 1203979
div_ser_scal 1338593
Qdivis 1560284
divRc 2349732
mul_polmod 2678214
add_rfrac 3039495
mul_intmod_same 3103269
mulcxmI 3142189
gsubsg 3184666
mul_polmod_scal 3440629
ser_add 3581038
add_intmod_same 3690618
addQp 4760443
mulTp 4981668
mulcxpowIs 5523672
fill_ser 5693636
init_ser 5705829
div_T_scal 5745964
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 11632523
gdivgs 12911361
divpp 13211528
addsub_polmod_scal 13516461
addsub_frac_i 14037434
setfrac 14819455
mulcxI 15554387
mulpp 17470327
conj_i 19340014
addsub_pp 19954762
add_scal 22904001
divcR 23100653
addsub_frac 28492667
ginv 36124327
mulrfrac 37482974
gred_rfrac2 44766507
gdivgu 54702234
Leading_is_neg 57828812
gred_rfrac_simple 57833139
mul_scal 117004123
gmulug 124315520
gmul2n 124701207
Qdivii 130639751
Qdiviu 133125543
transtype 154479832
divrunextu 223951658
gmulsg 227362307
gaddsg 270575167
mulcc 273493633
addRc 304454256
mulRc 351803418
gdiv 425638075
gsqr 1122445455
gsub 2801344700
gadd 5813880945
gmul 8420862479

Generated by: LCOV version 1.16