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 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.10.0 lcov report (development 20422-b487f4d) Lines: 624 718 86.9 %
Date: 2017-03-22 05:51:54 Functions: 96 100 96.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_given_value 3105
_higher 49
_lower 42
addhelp 42
alias0 28
andpari 218288
bin_number_len 38
bin_read 28
binary_read 56
chartoGENstr 56
check_name 0
check_proto 1506878
cmp_by_var 5059
compile_str 10108
dec_number_len 2812461
dec_read 7681776
dec_read_more 751960
dec_strtoi_len 751960
delete_var 61332
do_alias 5629621
eval_mnemonic 1584
exponent 75404
fetch_entry 3218
fetch_entry_raw 5563747
fetch_user_var 3120
fetch_var 37772
fetch_var_higher 23623
fetch_var_value 7
fill_hashtable_single 1518294
findentry 5639367
gadd1e 3164266
gadde 2373417
gdive 42
gdivente 7
gdivrounde 7
gmode 7
gmule 79934
gp_read_str 0
gpolvar 728
gshift_right 1392
gshiftle 7
gshiftre 7
gsub1e 14
gsube 15171541
hashvalue 1518294
hashvalue_raw 5639367
hex_number_len 54
hex_read 28
ifpari 12923297
ifpari_multi 42455
ifpari_void 16893949
initep 22866
insertep 1541090
install 0
int_read 7596859
is_entry 74635
isbin 34527927
ishex 34527878
kill0 14
killep 14
name_var 252
number 7757180
orpari 2407853
pari_add_function 0
pari_fill_hashtable 5706
pari_is_default 985
pari_isbdigit 1484
pari_lex 28470182
pari_pthread_init_varstate 3949
pari_thread_init_varstate 61986
pari_var_close 1934
pari_var_create 21086
pari_var_init 1427
pari_var_next 252
pari_var_next_temp 126
readseq 4081
real_0_digits 168
real_read 82858
real_read_more 2115
skipconstante 7479580
skipdigits 7481905
skipexponent 7478933
skipstring 1108259
strntoGENstr 216425
strtoGENstr 113836
strtobin_len 56
strtoi 7596859
strtor 82858
type0 23234
var_register 70
var_restore 78437
varentries_reset 322
varentries_set 7891
varentries_unset 19708
varhigher 63
varlower 28
vars_sort_inplace 147
vars_to_RgXV 147
varstate_restore 16477
varstate_save 90488

Generated by: LCOV version 1.11