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 - buch3.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30640-c2c58e18c5) Lines: 1523 1633 93.3 %
Date: 2026-01-27 08:51:18 Functions: 120 125 96.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ABC_to_bnr 273
Buchray 41391
Buchraymod 105956
Buchraymod_i 121216
Hermite_bound 63
Lbnrclassno 1484
ZM2_ZC2_mul 1359999
ZMV_mul 910
ZM_content_mul 102767
ZM_intersect 14
abmap_char_image 1232
abmap_nchar_image 1449
bnfcertify 35
bnfcertify0 63
bnfnarrow 35
bnr_char_sanitize 1260
bnr_get_El 1481369
bnr_get_U 1683542
bnr_get_Ui 24064
bnr_grp 32277
bnr_log_gen_arch 61767
bnr_log_gen_pr 246659
bnr_sanitize 16616
bnr_subgroup_check 145370
bnr_subgroup_sanitize 7132
bnr_vecchar_sanitize 350
bnrautmatrix 1918
bnrchar 609
bnrchar_i 609
bnrclassno 112
bnrclassno0 105
bnrclassno_1 28
bnrclassno_all 1106
bnrclassnolist 7
bnrcompositum 14
bnrconductor 616
bnrconductor0 63
bnrconductor_factored 509
bnrconductor_factored_arch 33666
bnrconductor_factored_i 5892
bnrconductor_raw 5383
bnrconductormod 532
bnrconductorofchar 7
bnrdisc 1627
bnrdisc0 175
bnrdisc_i 1627
bnrdisclist0 49
bnrgaloisapply 1609
bnrgaloismatrix 231
bnrinit0 0
bnrinitmod 63650
bnrisconductor 149682
bnrisconductor0 35
bnrisgalois 448
bnrisprincipal 411256
bnrisprincipalmod 1477789
bnrlcmcond 14
bnrliftsubgroup 28
bnrmap 616
bnrsurjection 15118
bnrtoprimitive 27774
bound_unit_index 63
check_bnrgal 448
check_prime 1715
chk_listBU 28
compute_M0 28
compute_fact 25515
cond0_e 33666
condoo_archp 33666
conductor_elts 57170
contains 285560
decodemodule 21
dft_bound 0
discrayabslist 21
discrayabslistarch 28
factordivexact 406
factormul 1043
factorpow 812
factorsplice 1169
fasmall_append 175
fast_val 17983
get_Gen 46914
get_NR1D 427
get_classno 910
get_discdata 469
get_discray 469
get_nz 168
get_pi 10003
get_pinvpi 9863
hdet 1022
ideallog_to_bnr 308425
ideallog_to_bnr_i 315537
idealmoddivisor 4214
idealmoddivisor_aux 15001
init_bad 63
is_complex 1228
is_module 21
is_unit 70553
is_zero 1804
isprimitive 35
isprincipalray 404172
isprincipalraygen 0
lowerboundforregulator 63
make_integral_Z 4368
minimforunits 42
minkowski_bound 0
nf_deg1_prime 0
prV_norms 1550
primecertify 1715
quotient_expo 6011
regulatorbound 35
rnfconductor 35
rnfconductor0 796
rnfnormgroup 14
rnfnormgroup_i 796
rowselect_p 1022
subgroup_conductor_ok 19271
subgroupcond 56715
subgrouplist0 58699
subgrouplist_cond_sub 455
too_big 15449
vecselect_p 1344
zimmertbound 63
zsimp 28
zsimpjoin 518

Generated by: LCOV version 1.16