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.1 lcov report (development 28697-a4113027d0) Lines: 1935 2060 93.9 %
Date: 2023-09-28 07:47:45 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 84
warn_coercion 105
mulqq 1106
addRq 1274
addsub_polmod 2142
mulRq 2352
divTp 3681
ser_normalize 7553
div_rfrac_scal 13169
quad_polmod_conj 18263
quad_polmod_norm 18263
div_scal_ser 18389
Q_to_Fp 24003
div_polmod_same 35867
div_scal_rfrac 37466
sqr_polmod 67356
inv_polmod 79891
gconj 99233
sqr_ser_part 104170
mul_gen_rfrac 160865
mulcxmI 198167
fix_rfrac 248290
mulcxpowIs 268250
div_rfrac_pol 270989
mul_ser_scal 307237
div_intmod_same 341850
add_ser_scal 396649
div_ser 761864
gdivgunextu 804801
sub_intmod_same 1158469
div_rfrac 1186656
divpT 1201732
div_ser_scal 1321422
Qdivis 1460136
divRc 2163679
addQp 2405513
divpp 2499141
mul_polmod_scal 2633360
mul_polmod 2678207
add_rfrac 3039474
mul_intmod_same 3102059
gsubsg 3154920
ser_add 3532192
add_intmod_same 3690579
mulTp 4892481
div_T_scal 5335173
fill_ser 5614613
init_ser 5626078
quad_polmod_mul 5907724
_serprec 7063586
mul_rfrac 7907114
addsub_pp 8053930
mul_polmod_same 8072839
gdivgs 8696228
add_rfrac_scal 8830973
div_scal_pol 9256399
div_scal_T 9265550
rfrac_denom_mul_scal 9856943
mul_rfrac_scal 10453238
mulcxI 10500808
mulcIR 11033254
addsub_frac_i 12599190
addsub_polmod_scal 12876279
mulpp 12949626
setfrac 13654575
conj_i 17703976
divcR 19405830
add_scal 22596980
ginv 23353779
addsub_frac 26104364
mulrfrac 30143828
gdivgu 43476806
gred_rfrac2 44765912
Leading_is_neg 57828525
gred_rfrac_simple 57832656
gmul2n 76203098
divrunextu 106664296
mul_scal 111395425
Qdivii 111908678
Qdiviu 115367134
gmulug 133776232
transtype 154478306
gmulsg 235536177
mulcc 249258680
addRc 287392365
gaddsg 287433109
mulRc 326268721
gdiv 411285473
gsqr 1079722751
gsub 2679960256
gadd 5550723611
gmul 8011132508

Generated by: LCOV version 1.14