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.16.1 lcov report (development 28676-df828f1c94) Lines: 537 582 92.3 %
Date: 2023-08-26 07:54:43 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 875300
apply0 52812
arithprogset 73247
check_callgen1 54689
diagonal 882
diagonal_shallow 350091
extract0 29211
extract_copy 94
extract_selector_ok 35
fold0 28
gen_parapply 371236
gen_parapply_percent 374141
gen_parapply_slice 6786
genapply 52812
genfold 28
genindexselect 96
genselect 83
get_range 112
gtomat 353243
gtrans 43599
mapapply1 7
matmuldiagonal 70
matmultodiagonal 7
matslice0 196
parapply 1744
parapply_slice_worker 76
parselect 30
row_transpose 15715331
row_transposecopy 18598
rowslice_i 14
rowsmallslice_i 0
select0 103
select_0 80
shallowextract 40037
shallowmatextract 10234
shallowtrans 4315716
str_to_long 182
vecapply 115070
vecapply1 167896
vecapply2 14
veccatapply 0
veccatselapply 0
vecrange 10569
vecrangess 0
vecselapply 448
vecselect 0
vecslice0 1610
vecslice_i 2562
vecslice_parse_arg 1981
vecsmallslice_i 28
vecsum 111499
zv_diagonal 448

Generated by: LCOV version 1.14