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 - bit.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29712-7c8a932571) Lines: 408 422 96.7 %
Date: 2024-11-15 09:08:45 Functions: 34 36 94.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
F2v_to_ZV_inplace 28042
binaire 28077
binary_2k 5539271
binary_2k_nv 5713610
binary_zv 35238
bits_to_int 0
bits_to_u 0
bittest 91
checkint2 37248855
fromdigits_2k 28014
gbitand 37248267
gbitneg 112
gbitnegimply 196
gbitor 196
gbittest 91
gbitxor 196
hamming_int 21
hamming_mat 7
hamming_slice 714
hamming_vecsmall 847
hammingl 24104068
hammingweight 1596
ibitand 37248204
ibitnegimply 203
ibitor 105
ibittrunc 35
ibitxor 147
inegate 630
int_get_bits 845965424
int_get_int 228516469
int_get_ulong 312274556
int_set_bits 797647154
int_set_int 192763
int_set_ulong 24
nv_fromdigits_2k 17423423
signs 37248659

Generated by: LCOV version 1.16