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 - language - anal.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.1 lcov report (development 28676-df828f1c94) Lines: 636 693 91.8 %
Date: 2023-08-26 07:54:43 Functions: 95 101 94.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
IS_ID 380
_given_value 2954
_higher 49
_lower 42
addhelp 50
alias0 28
andpari 64168367
arity0 28
bin_number_len 37
bin_read 28
binary_read 102
check_name 8
check_proto 2481908
cmp_by_var 5150
compile_str 10789
dec_number_len 3787268
dec_read 11336326
dec_read_more 871781
dec_strtoi_len 871781
delete_var 381683
do_alias 9260668
eval_mnemonic 28
exponent 75600
fetch_entry 464557
fetch_entry_raw 9690279
fetch_user_var 464443
fetch_var 100862
fetch_var_higher 284102
fetch_var_value 7
fill_hashtable_single 2505405
findentry 15588651
gadd1e 25685195
gadde 532856
gdive 56
gdivente 7
gdivrounde 7
gmode 7
gmule 178215
gp_read_str 0
gp_read_str_bitprec 0
gp_read_str_prec 0
gpolvar 1183
gshift_right 1392
gshiftle 7
gshiftre 7
gsub1e 28014
gsube 15455370
hex_number_len 108
hex_read 74
ifpari 12963238
ifpari_multi 31325
ifpari_void 41289036
initep 33726
insertep 2539020
install 20
int_read 11246686
is_entry 5897503
is_long 493831
is_ulong 1821
isbin 46712773
ishex 46712717
isreturn 2481908
kill0 18
killep 18
name_var 0
number 11411926
orpari 16517536
pari_add_function 0
pari_fill_hashtable 5417
pari_is_default 870
pari_isbdigit 1064
pari_lex 37698254
pari_set_varstate 313882
pari_var_close 1799
pari_var_create 494669
pari_var_init 1809
pari_var_next 8
pari_var_next_temp 0
readseq 803766
readseq_i 803766
real_0_digits 175
real_read 85339
real_read_more 4403
skipconstante 11249188
skipdigits 11254218
skipexponent 11247824
skipstring 763974
strtobin_len 102
strtoi 11246686
strtor 85339
var_register 111
var_restore 325963
varentries_reset 111
varentries_set 9154
varentries_unset 15139
varhigher 98
varlower 34
vars_sort_inplace 1197
vars_to_RgXV 175
varstate_restore 12053
varstate_save 447189

Generated by: LCOV version 1.14