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.2 lcov report (development 29115-f22e516b23) Lines: 636 693 91.8 %
Date: 2024-04-19 08:07:09 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 2982
_higher 49
_lower 42
addhelp 50
alias0 28
andpari 64280934
arity0 28
bin_number_len 37
bin_read 28
binary_read 102
check_name 8
check_proto 2538170
cmp_by_var 5150
compile_str 10992
dec_number_len 3789420
dec_read 11825958
dec_read_more 872527
dec_strtoi_len 872527
delete_var 383436
do_alias 9580213
eval_mnemonic 28
exponent 75600
fetch_entry 448919
fetch_entry_raw 9992079
fetch_user_var 448805
fetch_var 100783
fetch_var_higher 285954
fetch_var_value 7
fill_hashtable_single 2561940
findentry 18151037
gadd1e 25685195
gadde 534445
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 20881
gsube 15455370
hex_number_len 108
hex_read 74
ifpari 13075700
ifpari_multi 31325
ifpari_void 41465681
initep 34034
insertep 2595863
install 20
int_read 11736110
is_entry 8158010
is_long 503224
is_ulong 1842
isbin 49028236
ishex 49028180
isreturn 2538170
kill0 18
killep 18
name_var 0
number 11901558
orpari 16719531
pari_add_function 0
pari_fill_hashtable 5480
pari_is_default 944
pari_isbdigit 1064
pari_lex 39615887
pari_set_varstate 316110
pari_var_close 1820
pari_var_create 478872
pari_var_init 1830
pari_var_next 8
pari_var_next_temp 0
readseq 803780
readseq_i 803780
real_0_digits 196
real_read 85436
real_read_more 4514
skipconstante 11739149
skipdigits 11744319
skipexponent 11737729
skipstring 843673
strtobin_len 102
strtoi 11736110
strtor 85436
var_register 111
var_restore 328318
varentries_reset 111
varentries_set 9010
varentries_unset 15343
varhigher 98
varlower 34
vars_sort_inplace 1197
vars_to_RgXV 175
varstate_restore 12229
varstate_save 451582

Generated by: LCOV version 1.14