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.18.1 lcov report (development 30106-3f17b77578) Lines: 1886 2010 93.8 %
Date: 2025-03-31 09:19:50 Functions: 103 103 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
mulRq 2310
divTp 3660
addsub_polmod 7203
ser_normalize 7658
quad_polmod_conj 18340
quad_polmod_norm 18340
div_scal_ser 18550
div_rfrac_scal 32139
div_polmod_same 37093
div_scal_rfrac 37767
sqr_ser_part 112731
gconj 133221
mul_gen_rfrac 161432
fix_rfrac 207774
inv_polmod 209968
Q_to_Fp 226838
div_rfrac_pol 262344
mul_ser_scal 316204
div_intmod_same 341986
add_ser_scal 408094
sqr_polmod 484275
div_ser 771510
gdivgunextu 1036796
sub_intmod_same 1053721
div_rfrac 1187237
divpT 1204910
div_ser_scal 1338593
Qdivis 1583909
divRc 2358153
mul_polmod 2674917
mul_intmod_same 2835817
add_rfrac 3018187
mulcxmI 3078997
gsubsg 3168038
mul_polmod_scal 3428782
add_intmod_same 3550213
ser_add 3581388
addQp 4762852
mulTp 4982863
mulcxpowIs 5524212
fill_ser 5693888
init_ser 5706235
quad_polmod_mul 5860762
div_T_scal 6726526
_serprec 7161978
mul_self_scal 7461000
mul_rfrac 7910285
mul_polmod_same 8565249
add_rfrac_scal 8811947
div_scal_pol 9274198
div_scal_T 9280992
rfrac_denom_mul_scal 9959428
mul_rfrac_scal 10455276
mulcIR 11664586
gdivgs 12965921
divpp 13212217
addsub_polmod_scal 13420724
addsub_frac_i 13628306
setfrac 14437019
mulcxI 15648408
mulpp 17503152
conj_i 19578027
addsub_pp 19967746
divcR 23127768
mkpadic_mod 24588591
ginv 36372950
mulrfrac 37587481
addsub_frac 41397050
add_scal 44619236
gred_rfrac2 44823313
gdivgu 54716644
Leading_is_neg 57792491
gred_rfrac_simple 57796671
gmulug 124340573
gmul2n 133226532
Qdivii 140102699
Qdiviu 141441319
mul_scal 150356939
transtype 154420315
divrunextu 224317603
gmulsg 229741588
gaddsg 270603017
mulcc 273966070
addRc 303947479
mulRc 351194562
gdiv 433976724
gsqr 1175209718
gsub 2848170361
gadd 6073195783
gmul 8754605217

Generated by: LCOV version 1.16