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 19823-d80e022) Lines: 623 718 86.8 %
Date: 2016-12-03 05:49:13 Functions: 96 100 96.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_given_value 3035
_higher 49
_lower 42
addhelp 42
alias0 28
andpari 175651
bin_number_len 38
bin_read 28
binary_read 56
chartoGENstr 56
check_name 0
check_proto 1372916
cmp_by_var 5059
compile_str 10108
dec_number_len 2812340
dec_read 7619589
dec_read_more 751885
dec_strtoi_len 751885
delete_var 106014
do_alias 5545120
eval_mnemonic 1584
exponent 75404
fetch_entry 2798
fetch_entry_raw 5481567
fetch_user_var 2700
fetch_var 37499
fetch_var_higher 68617
fetch_var_value 7
fill_hashtable_single 1382366
findentry 5555776
gadd1e 3163195
gadde 2373417
gdive 35
gdivente 7
gdivrounde 7
gmode 7
gmule 91134
gp_read_str 0
gpolvar 728
gshift_right 1392
gshiftle 7
gshiftre 7
gsub1e 14
gsube 15171541
hashvalue 1382366
hashvalue_raw 5555776
hex_number_len 54
hex_read 28
ifpari 12903782
ifpari_multi 74452
ifpari_void 16792449
initep 21767
insertep 1404063
install 0
int_read 7534889
is_entry 73294
isbin 34279106
ishex 34279057
kill0 14
killep 14
name_var 224
number 7694993
orpari 2480947
pari_add_function 0
pari_fill_hashtable 5398
pari_is_default 915
pari_isbdigit 1484
pari_lex 28263395
pari_pthread_init_varstate 3928
pari_thread_init_varstate 61727
pari_var_close 1857
pari_var_create 18965
pari_var_init 1350
pari_var_next 224
pari_var_next_temp 126
readseq 3675
real_0_digits 168
real_read 82704
real_read_more 2052
skipconstante 7418169
skipdigits 7420403
skipexponent 7417557
skipstring 1107895
strntoGENstr 210589
strtoGENstr 112235
strtobin_len 56
strtoi 7534889
strtor 82704
type0 23108
var_register 70
var_restore 77424
varentries_reset 294
varentries_set 7457
varentries_unset 19071
varhigher 63
varlower 28
vars_sort_inplace 147
vars_to_RgXV 147
varstate_restore 15917
varstate_save 86113

Generated by: LCOV version 1.11