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 30072-2ccdc2326c) Lines: 773 801 96.5 %
Date: 2025-03-12 09:19:58 Functions: 44 45 97.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
BD_deg1 0
next2pow 14
LLL_cmbf 126
chk_factors 140
polcyclofactors 315
chk_factors_get 350
BD_odd 406
QX_factor 791
poliscycloprod 1029
LLL_check_progress 1547
myconcat 2310
BD 2359
QX_gcd 18817
_gcd 18817
invphi 19580
ZX_factor 49679
cmbf 49798
cmbf_precs 49798
combine_factors 49798
fact_from_DDF 50463
ZX_factor_i 50470
Beauzamy_bound 60284
Mignotte_bound 60284
factor_bound 60284
poliscyclo 99006
ZX_is_irred 102370
root_bound 110034
ZX_gcd_chinese 110881
ZX_gcd_filter 115861
ZX_DDF 152178
shifteval 183513
ZX_is_squarefree 197958
ZX_DDF_max 204119
ZX_squff 332620
DDF_roots 1622728
nfrootsQ 1622730
pick_prime 1826848
ZX_radical 2662659
ZX_gcd_slice 3345323
ZX_gcd_worker 3345323
ZX_gcd_Flx 3351291
ZX_divides 6545021
ZX_divides_i 6573680
ZX_gcd 9774952
ZX_gcd_all 13110747

Generated by: LCOV version 1.16