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 - basemath - arith2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.10.0 lcov report (development 20777-d2a9243) Lines: 596 638 93.4 %
Date: 2017-06-25 05:59:24 Functions: 86 89 96.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
RgV_is_ZV0 20888
RgV_is_ZVnon0 6615
RgV_is_ZVpos 7006662
RgV_is_prV 22883
ZV_in_range 14
Z_issquarefree 2179
Z_smoothen 11299
_addii 1771
_dvmdii 436
_mod4 84
_mulii 200064
_sqri 794195
arith_n 2912
bigomega 1589
bigomegau 821
boundfact 35
check_arith_all 240030
check_arith_non0 76538
check_arith_pos 210
check_basis 182
clean_Z_factor 20832
cmpi1 4354
core0 3094
core2 1477
core2_i 1484
core2fa 1099
core2partial 1099
coredisc 77
coredisc0 14
coredisc2 7
corediscs 2892
corefa 0
corepartial 0
digits 56
digits_dacsmall 3075
divisors 361403
divisors0 777
divisors_factored 721
divisors_init 362166
divisorsu 113074
divisorsu_fact 8255888
euler_sumdiv 17188
eulerphi 145607
eulerphiu 149936
eulerphiu_fact 292030
fa_clean 3486
fa_issquarefree 1407
factor_pn_1 65033
factor_pn_1_limit 65033
factorlim 85207
factoru_pow 29823
fromdigits 56
fromdigitsu 832885
fromdigitsu_dac 2622383
fuse_Z_factor 0
gen_digits 6230
gen_digits_dac 166283
gen_digits_i 6280
gen_fromdigits 2527
gen_fromdigits_dac 28889
get_vB 841628
is_Z_factor 20888
is_Z_factor_i 3516897
is_Z_factornon0 6615
is_Z_factorpos 3489394
is_nf_extfactor 14
is_nf_factor 26691
issquarefree 3759
ndiv 362103
numdiv 1589
numdiv_aux 760
omega 1589
omegau 815
set_fact 11410
set_fact_check 350749
set_vexp 2482112
sumdigits 35
sumdigits0 105
sumdigits_block 14
sumdigitsu 355152
sumdiv 3017
sumdiv_aux 1474
sumdivk 7987
sumdivk_aux 1506
u_euler_sumdiv 2720
uissquarefree 17001
uissquarefree_fact 1155
usumdiv_fact 1501
usumdivk_fact 8371

Generated by: LCOV version 1.11