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 30074-db9b3c0519) Lines: 195 204 95.6 %
Date: 2025-03-13 08:38:27 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 13014
gen_digits_i 13063
ZV_in_range 24024
digits_neg 48024
gen_fromdigits 76224
digits_pos 96078
digits_i 96132
digits 96150
fromdigits 96234
check_basis 192402
gen_digits_dac 280835
sumdigitsu 304416
_addii 360510
digits_dacsmall 411337
_mulii 720870
fromdigitsu 751834
fromdigitsu_i 751846
gen_fromdigits_dac 833640
get_vB 888442
_sqri 1176715
fromdigitsu_dac 3101108
set_vexp 3334980

Generated by: LCOV version 1.16