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 30702-bddb8d6928) Lines: 1523 1633 93.3 %
Date: 2026-02-23 02:23:56 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 234
Buchray 35082
Buchraymod 217084
Buchraymod_i 230765
Hermite_bound 49
Lbnrclassno 1272
ZM2_ZC2_mul 1170523
ZMV_mul 780
ZM_content_mul 205145
ZM_intersect 11
abmap_char_image 1056
abmap_nchar_image 1233
bnfcertify 25
bnfcertify0 49
bnfnarrow 30
bnr_char_sanitize 1080
bnr_get_El 1275617
bnr_get_U 1692480
bnr_get_Ui 21670
bnr_grp 27646
bnr_log_gen_arch 95059
bnr_log_gen_pr 413904
bnr_sanitize 35777
bnr_subgroup_check 235812
bnr_subgroup_sanitize 7844
bnr_vecchar_sanitize 300
bnrautmatrix 2652
bnrchar 513
bnrchar_i 513
bnrclassno 96
bnrclassno0 90
bnrclassno_1 24
bnrclassno_all 948
bnrclassnolist 6
bnrcompositum 11
bnrconductor 528
bnrconductor0 54
bnrconductor_factored 510
bnrconductor_factored_arch 53024
bnrconductor_factored_i 4727
bnrconductor_raw 4217
bnrconductormod 448
bnrconductorofchar 6
bnrdisc 1410
bnrdisc0 150
bnrdisc_i 1410
bnrdisclist0 42
bnrgaloisapply 3066
bnrgaloismatrix 198
bnrinit0 0
bnrinitmod 181136
bnrisconductor 235763
bnrisconductor0 30
bnrisgalois 384
bnrisprincipal 334356
bnrisprincipalmod 1271641
bnrlcmcond 11
bnrliftsubgroup 22
bnrmap 528
bnrsurjection 12994
bnrtoprimitive 48297
bound_unit_index 49
check_bnrgal 384
check_prime 1235
chk_listBU 24
compute_M0 23
compute_fact 21850
cond0_e 53024
condoo_archp 53024
conductor_elts 156807
contains 425679
decodemodule 18
dft_bound 0
discrayabslist 18
discrayabslistarch 24
factordivexact 348
factormul 894
factorpow 696
factorsplice 1002
fasmall_append 150
fast_val 15404
get_Gen 41200
get_NR1D 366
get_classno 780
get_discdata 402
get_discray 402
get_nz 144
get_pi 8569
get_pinvpi 8449
hdet 876
ideallog_to_bnr 508963
ideallog_to_bnr_i 523326
idealmoddivisor 3010
idealmoddivisor_aux 12243
init_bad 49
is_complex 1052
is_module 18
is_unit 50438
is_zero 1544
isprimitive 26
isprincipalray 328284
isprincipalraygen 0
lowerboundforregulator 49
make_integral_Z 3742
minimforunits 33
minkowski_bound 0
nf_deg1_prime 0
prV_norms 1344
primecertify 1235
quotient_expo 5146
regulatorbound 26
rnfconductor 27
rnfconductor0 688
rnfnormgroup 12
rnfnormgroup_i 690
rowselect_p 876
subgroup_conductor_ok 81532
subgroupcond 156482
subgrouplist0 158371
subgrouplist_cond_sub 325
too_big 12627
vecselect_p 1152
zimmertbound 49
zsimp 24
zsimpjoin 444

Generated by: LCOV version 1.16