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 - language - sumiter.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30074-db9b3c0519) Lines: 1233 1297 95.1 %
Date: 2025-03-13 08:38:27 Functions: 105 105 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FD 138
Flm2negfact 6001356
RgV_is_ZV_nonneg 6120
_evalclosprec 30
_fordiv 24
_g 142
_gi 17678
_next 54
_next_i 157408
_next_le 132
_next_le_i 164
_next_lt 72
_next_lt_i 1005908
_next_mod_cyc 7254
_next_void 12
asympnum 42
asympnum0 48
asympnumraw 12
asympnumraw0 12
binsum 7674
chk_ind 192
chk_ord 366
copyupto 2444948
delt 1110
deriv_eval 288
derivfun 846
derivfun0 96
derivfunk 1038
derivnum 834
derivnum0 942
derivnumk 162
direuler0 114
eval0 60
fordiv 12
fordivfactored 12
foreachpari 840
forfactored 120
forfactoredneg 72
forfactoredpos 54
forpari 4382232
forparii 4382226
forsquarefree 30
forsquarefreeneg 18
forsquarefreepos 18
forstep 1404
forvec 6060
forvec_init 6126
forvec_mod_cyc_init 36
forvec_next 1171004
get_accu 120
get_c 126
get_fun 138
get_u 120
iferrpari 1101516
laurentseries 18
laurentseries0 30
limit_Nprec 114
limit_init 120
limitnum 72
limitnum0 78
limitnum_i 842
matrice 138144
negcmp 24
no_sieve 162
polzag 30
polzag1 72
proddiff 2574
prodeuler 12
prodeuler0 12
prodinf 12
prodinf0 24
prodinf1 6
produit 103452
rfrac_val_deriv 12
solvedivlog 12
solvestep 102
solvestep0 30
somme 60198
sum_init 24
sumalt 72
sumalt0 24
sumalt2 6
sumalt_N 132
sumdivexpr 48
sumdivmultexpr 42
sumdivmultexpr0 42
suminf 24
suminf0 24
sumpos 60
sumpos0 78
sumpos2 12
sumpos_init 72
untilpari 190348
vecexpr0 113800
vecexpr1 1812
vecpows 12
vecteur 2031672
vecteursmall 678
vfact 138
vvecteur 1758
whilepari 1538340
zbrent 20076
zbrent0 66
zv_to_ZM 3647622
zv_to_mZM 3647622

Generated by: LCOV version 1.16