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 - QX_factor.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30209-fa4743ed68) Lines: 913 954 95.7 %
Date: 2025-04-25 09:18:24 Functions: 61 64 95.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
BD_deg1 0
Rg_is_QXk 0
ZXk_divexact 0
next2pow 14
LLL_cmbf 126
chk_factors 140
QXk_gcd 189
polcyclofactors 315
chk_factors_get 350
BD_odd 406
QX_factor 791
poliscycloprod 1029
LLL_check_progress 1547
myconcat 2310
BD 2359
QX_gcd 18630
_gcd 18819
invphi 19578
ZX_factor 49574
cmbf 49707
cmbf_precs 49707
combine_factors 49707
fact_from_DDF 50358
ZX_factor_i 50365
Beauzamy_bound 60194
Mignotte_bound 60194
factor_bound 60194
poliscyclo 98955
ZX_is_irred 102184
root_bound 109944
ZX_gcd_chinese 115227
ZX_gcd_filter 121381
ZX_DDF 151869
shifteval 183318
ZX_is_squarefree 197661
ZX_DDF_max 203667
ZX_squff 332515
DDF_roots 1622731
nfrootsQ 1622738
ZXk_gcd 1686063
rec 1714455
pick_prime 1826398
ZXkX_ZXk_divexact 2528103
ZXk_divexact_i 2529297
ZXkX_ZXk_divexact_s 2571335
ZX_radical 2662461
ZXk_divides_i 2789715
centeri2n 3214540
ZXkX_ZXk_divides_s 3264969
ZX_gcd_slice 3354132
ZX_gcd_worker 3354134
ZX_gcd_Flx 3365779
ZXk_content_shallow 3445402
dividesii 3481571
ZXk_center2n 4910915
ZXk_renormalize 4961344
ZXk_divides 6218604
ZX_divides 6553125
ZX_divides_i 6581783
ZXk_divexact_s 7584467
ZXk_gcd_i 8689704
ZXk_divides_s 10123448
ZX_gcd 10622967
ZX_gcd_all 13958358

Generated by: LCOV version 1.16