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 28880-3b5364847c) Lines: 1935 2060 93.9 %
Date: 2023-12-01 07:53:15 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 3667
ser_normalize 7560
div_rfrac_scal 13169
quad_polmod_conj 18277
quad_polmod_norm 18277
div_scal_ser 18389
Q_to_Fp 23957
div_polmod_same 35966
div_scal_rfrac 37466
sqr_polmod 76035
inv_polmod 80304
gconj 99363
sqr_ser_part 106844
mul_gen_rfrac 160865
mulcxmI 198155
fix_rfrac 248290
mulcxpowIs 268250
div_rfrac_pol 270989
mul_ser_scal 307335
div_intmod_same 341859
add_ser_scal 396747
div_ser 766414
gdivgunextu 804801
sub_intmod_same 1158469
div_rfrac 1186656
divpT 1201746
div_ser_scal 1330634
Qdivis 1513762
divRc 2125967
addQp 2390151
divpp 2507650
mul_polmod_scal 2637395
mul_polmod 2678207
add_rfrac 3039474
mul_intmod_same 3102299
gsubsg 3155096
ser_add 3557910
add_intmod_same 3690582
mulTp 4891063
div_T_scal 5343638
fill_ser 5650922
init_ser 5662345
quad_polmod_mul 5908420
_serprec 7115022
mul_rfrac 7907114
mul_polmod_same 8075585
addsub_pp 8080950
gdivgs 8798350
add_rfrac_scal 8830973
div_scal_pol 9256147
div_scal_T 9265298
rfrac_denom_mul_scal 9856712
mul_rfrac_scal 10453245
mulcxI 10471698
mulcIR 11096600
addsub_polmod_scal 12877598
mulpp 12964438
addsub_frac_i 13289046
setfrac 13920097
conj_i 17719745
divcR 19405088
add_scal 22607779
ginv 25975576
addsub_frac 27352117
mulrfrac 30185336
gdivgu 43497584
gred_rfrac2 44765898
Leading_is_neg 57828301
gred_rfrac_simple 57832628
divrunextu 106676997
gmul2n 106794871
mul_scal 111373375
Qdivii 112920329
Qdiviu 114880606
gmulug 133861247
transtype 154477578
gmulsg 238899825
mulcc 249824663
gaddsg 287448894
addRc 295852311
mulRc 333145393
gdiv 412524242
gsqr 1103065571
gsub 2714135425
gadd 5603397316
gmul 8123398847

Generated by: LCOV version 1.14