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 - basemath - arith2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.12.0 lcov report (development 23008-54b2e2f01) Lines: 590 643 91.8 %
Date: 2018-09-20 05:37:46 Functions: 87 92 94.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
core2fa 0
core2partial 0
corefa 0
corepartial 0
fuse_Z_factor 0
coredisc2 7
ZV_in_range 14
coredisc0 14
is_nf_extfactor 14
sumdigits_block 14
sumdigits 35
boundfact 42
fromdigits 56
digits 70
sumdigits0 105
coredisc 182
_mod4 189
check_basis 196
check_arith_pos 210
_dvmdii 436
divisors_factored 721
numdiv_aux 760
divisors0 777
numdivu 815
omegau 815
bigomegau 821
uissquarefree_fact 1183
fa_issquarefree 1407
sumdiv_aux 1474
core2 1477
core2_i 1484
sumdivk_aux 1506
bigomega 1589
numdiv 1589
omega 1589
_addii 1771
Z_issquarefree 2179
gen_fromdigits 2534
sumdiv 3017
core0 3094
digits_dacsmall 3117
fa_clean 3486
arith_n 3500
corediscs 3816
issquarefree 4004
cmpi1 4354
RgV_is_ZVnon0 6615
is_Z_factornon0 6622
divisorsu_moebius 8253
sumdivk 10423
gen_digits 10472
gen_digits_i 10522
set_fact 11508
usumdiv_fact 11518
Z_smoothen 12050
usumdivk_fact 12732
clean_Z_factor 15505
u_euler_sumdiv 15950
RgV_is_ZV0 16968
is_Z_factor 16968
uissquarefree 18261
euler_sumdiv 23138
RgV_is_prV 23359
is_nf_factor 26852
gen_fromdigits_dac 28896
factoru_pow 31330
check_arith_non0 39278
factor_pn_1 70675
factor_pn_1_limit 70675
factorlim 90884
divisorsu 136147
eulerphi 146195
eulerphiu 150517
gen_digits_dac 205665
check_arith_all 239498
eulerphiu_fact 244228
_mulii 249292
set_fact_check 350749
sumdigitsu 355152
divisors 361501
ndiv 362201
divisors_init 362264
fromdigitsu 922843
get_vB 935527
_sqri 958779
is_Z_factorpos 2438119
is_Z_factor_i 2461709
set_vexp 2919851
fromdigitsu_dac 3091419
RgV_is_ZVpos 4906114
divisorsu_fact 11506626
numdivu_fact 11510031

Generated by: LCOV version 1.13