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 - alglin3.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29580-d8b649a849) Lines: 550 595 92.4 %
Date: 2024-10-04 09:07:15 Functions: 47 53 88.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
RgM_diagonal 0
RgM_diagonal_shallow 885949
apply0 52826
arithprogset 73185
check_callgen1 54731
diagonal 1335478
diagonal_shallow 350612
extract0 29132
extract_copy 101
extract_selector_ok 35
fold0 28
gen_parapply 371893
gen_parapply_percent 374798
gen_parapply_slice 7246
genapply 52826
genfold 28
genindexselect 110
genselect 104
get_range 112
gtomat 354849
gtrans 43617
mapapply1 21
matmuldiagonal 70
matmultodiagonal 7
matslice0 210
parapply 1744
parapply_slice_worker 44
parselect 30
row_transpose 25638122
row_transposecopy 18700
rowslice_i 14
rowsmallslice_i 0
select0 131
select_0 77
shallowextract 39108
shallowmatextract 10304
shallowtrans 6870463
str_to_long 182
vecapply 115406
vecapply1 168232
vecapply2 14
veccatapply 0
veccatselapply 0
vecrange 10660
vecrangess 0
vecselapply 448
vecselect 0
vecslice0 1617
vecslice_i 2653
vecslice_parse_arg 2016
vecsmallslice_i 28
vecsum 147186
zv_diagonal 448

Generated by: LCOV version 1.16