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 29115-f22e516b23) Lines: 1935 2060 93.9 %
Date: 2024-04-29 08:07:43 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 18319
quad_polmod_norm 18319
div_scal_ser 18395
Q_to_Fp 23957
div_polmod_same 36001
div_scal_rfrac 37466
sqr_ser_part 106856
gconj 132167
mul_gen_rfrac 160865
inv_polmod 207856
fix_rfrac 248339
div_rfrac_pol 270989
mul_ser_scal 311733
div_intmod_same 341801
add_ser_scal 401228
sqr_polmod 483334
div_ser 767986
gdivgunextu 804801
sub_intmod_same 1158469
div_rfrac 1186656
divpT 1201746
div_ser_scal 1332367
Qdivis 1518564
mulcxmI 1608208
divRc 2259089
addQp 2390172
divpp 2508424
mul_polmod 2678207
add_rfrac 3039474
mul_intmod_same 3101837
gsubsg 3189454
mul_polmod_scal 3439497
ser_add 3562101
add_intmod_same 3690461
mulcxpowIs 4465412
mulTp 4891077
fill_ser 5664879
init_ser 5677019
div_T_scal 5727023
quad_polmod_mul 5908951
_serprec 7123404
mul_rfrac 7907142
addsub_pp 8080998
mul_polmod_same 8624058
add_rfrac_scal 8830987
div_scal_pol 9256364
div_scal_T 9265521
rfrac_denom_mul_scal 9857104
mul_rfrac_scal 10453343
mulcIR 11504201
gdivgs 12164929
mulpp 12964562
addsub_polmod_scal 13511208
addsub_frac_i 13748448
mulcxI 14385259
setfrac 14523766
conj_i 19098579
divcR 22456922
add_scal 22896908
addsub_frac 27962196
ginv 34286720
mulrfrac 35716194
gdivgu 43899621
gred_rfrac2 44766472
Leading_is_neg 57828735
gred_rfrac_simple 57833062
mul_scal 116577507
gmul2n 116798235
gmulug 124278721
Qdivii 129198808
Qdiviu 131661568
transtype 154479411
divrunextu 206325810
gmulsg 244877487
mulcc 263664234
gaddsg 270985770
addRc 301985126
mulRc 351009867
gdiv 421475050
gsqr 1120478632
gsub 2803678904
gadd 5719072552
gmul 8340528095

Generated by: LCOV version 1.14