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 20459-9710128) Lines: 554 598 92.6 %
Date: 2017-04-29 05:33:44 Functions: 79 82 96.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
RgV_is_ZV0 2766
RgV_is_ZVnon0 4428
RgV_is_ZVpos 2716486
RgV_is_prV 2274
ZV_in_range 12
Z_issquarefree 18
Z_smoothen 7524
_addii 1518
_dvmdii 372
_mod4 12
_mulii 118050
_sqri 551622
bigomega 1362
bigomegau 708
boundfact 30
check_arith_all 157158
check_arith_non0 30787
check_arith_pos 162
check_basis 156
clean_Z_factor 3894
core0 2652
core2 1266
core2_i 1272
core2fa 660
core2partial 660
coredisc 6
coredisc0 12
coredisc2 6
corediscs 2364
corefa 0
corepartial 0
digits 48
digits_dacsmall 2640
divisors 309762
divisors_init 309798
divisorsu 85798
divisorsu_fact 86842
euler_sumdiv 8946
eulerphi 124806
eulerphiu 128520
eulerphiu_fact 129702
factor_pn_1 53478
factor_pn_1_limit 53478
factorlim 68898
factoru_pow 24549
fromdigits 48
fromdigitsu 626712
fromdigitsu_dac 1804296
fuse_Z_factor 0
gen_digits 5340
gen_digits_dac 142524
gen_digits_i 5382
gen_fromdigits 2166
gen_fromdigits_dac 24762
get_vB 634206
is_Z_factor 2766
is_Z_factor_i 1361702
is_Z_factornon0 4428
is_Z_factorpos 1354508
is_nf_extfactor 12
is_nf_factor 5520
issquarefree 810
numdiv 1362
numdiv_aux 648
omega 1362
omegau 702
set_fact 9150
set_fact_check 300642
set_vexp 1782102
sumdigits 30
sumdigits0 90
sumdigits_block 12
sumdigitsu 304416
sumdiv 1362
sumdiv_aux 642
sumdivk 5610
sumdivk_aux 1284
u_euler_sumdiv 1422
uissquarefree 10494
uissquarefree_fact 270
usumdiv_fact 696
usumdivk_fact 3312

Generated by: LCOV version 1.11