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 29420-55f63b8cfe) Lines: 1935 2060 93.9 %
Date: 2024-07-03 09:03:24 Functions: 101 101 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Leading_is_neg 57828812
Q_to_Fp 226838
Qdivii 130633546
Qdivis 1560279
Qdiviu 133119736
Zp_nosquare_m1 42
_serprec 7161278
addQp 4760478
addRc 304438505
addRq 1274
addTp 7
add_intmod_same 3690647
add_rfrac 3039495
add_rfrac_scal 8830994
add_scal 22904000
add_ser_scal 408031
addqf 77
addsub_frac 28492708
addsub_frac_i 14037446
addsub_polmod 2142
addsub_polmod_scal 13516531
addsub_pp 19954366
conj_i 19339952
conjvec 84
divRc 2349846
divTp 3660
div_T_scal 5745918
div_intmod_same 341833
div_polmod_same 36211
div_rfrac 1186656
div_rfrac_pol 271003
div_rfrac_scal 13169
div_scal_T 9265697
div_scal_pol 9256385
div_scal_rfrac 37466
div_scal_ser 18550
div_ser 771146
div_ser_scal 1338593
divcR 23100775
divfq 42
divpT 1203979
divpp 13211554
divqf 63
divrunextu 223710856
fill_ser 5693629
fix_rfrac 248325
gadd 5805157735
gaddsg 270574881
gconj 132038
gdiv 425634376
gdivgs 12911457
gdivgu 54702908
gdivgunextu 813628
ginv 36122038
gmul 8426612130
gmul2n 124697572
gmulsg 227359747
gmulug 124315507
gred_rfrac2 44766507
gred_rfrac_simple 57833139
gsqr 1122324493
gsub 2801001003
gsubsg 3184663
init_ser 5705822
inv_polmod 208554
is_ext_qfr 98
kro_quad 28
mulRc 356260462
mulRc_direct 49
mulRq 2352
mulTp 4981684
mul_gen_rfrac 160865
mul_intmod_same 3103525
mul_polmod 2678214
mul_polmod_same 8630564
mul_polmod_scal 3440650
mul_rfrac 7907128
mul_rfrac_scal 10453385
mul_scal 117003652
mul_ser_scal 316148
mulcIR 11633118
mulcc 273490249
mulcxI 15554191
mulcxmI 3142140
mulcxpowIs 5522389
mulpp 17470526
mulqf 28
mulqq 1106
mulrfrac 37483467
quad_polmod_conj 18319
quad_polmod_mul 5908349
quad_polmod_norm 18319
rfrac_denom_mul_scal 9857076
ser_add 3581038
ser_normalize 7560
setfrac 14819447
sqr_polmod 484338
sqr_ser_part 112381
sub_intmod_same 1158553
transtype 154479832
warn_coercion 105

Generated by: LCOV version 1.16