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 - digits.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 195 204 95.6 %
Date: 2026-02-23 02:23:56 Functions: 27 27 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
sumdigits_block 12
zv_nonnegative 18
sumdigits 30
sumdigits0 120
_dvmdii 380
gen_digits 13080
gen_digits_i 13129
ZV_in_range 24024
digits_neg 48024
gen_fromdigits 76206
digits_pos 96078
digits_i 96132
digits 96150
fromdigits 96216
check_basis 192384
gen_digits_dac 281723
sumdigitsu 304416
_addii 360492
digits_dacsmall 411337
_mulii 726400
gen_fromdigits_dac 833586
fromdigitsu 910902
fromdigitsu_i 910914
get_vB 1047564
_sqri 1202420
fromdigitsu_dac 3321044
set_vexp 3545824

Generated by: LCOV version 1.16