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-bordeaux1.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.8.0 lcov report (development 16937-4bd9b4e) Lines: 608 720 84.4 %
Date: 2014-10-24 Functions: 77 86 89.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 332 479 69.3 %

Function Name Sort by function name Hit count Sort by hit count
RgV_is_ZV0 210
RgV_is_ZVnon0 259
RgV_is_ZVpos 271232
Z_issquarefree 764
Z_smoothen 9541
_addii 3360
_dvmdii 436
_mod4 14
_mulii 3619
_sqri 553
bigomega 189
boundfact 35
check_arith_all 169414
check_arith_non0 2494
check_arith_pos 0
check_basis 168
clean_Z_factor 168
core0 266
core2 63
core2_i 70
core2fa 154
core2partial 154
coredisc 7
coredisc0 14
coredisc2 7
corefa 0
corepartial 0
digits 49
digits_dacsmall 3054
divisors 361319
divisors_init 361361
divisorsu 30115
euler_sumdiv 1970
euler_sumdivk 454
eulerphi 144193
eulerphiu 148816
eulerphiu_fact 149187
factor_pn_1 6622
factor_pn_1_limit 6622
factorlim 23730
factoru_pow 22206
fromdigits 42
fuse_Z_factor 0
gen_digits 3528
gen_digits_dac 84299
gen_digits_i 3578
gen_fromdigits 1526
gen_fromdigits_dac 18830
get_vB 5103
good_arena_size 1201
init_primepointer_geq 0
init_primepointer_gt 0
init_primepointer_leq 0
init_primepointer_lt 6080756
initprimes 1201
initprimes0 1201
initprimes1 1201
initprimetable 1201
is_Z_factor 210
is_Z_factor_i 135861
is_Z_factornon0 259
is_Z_factorpos 135392
issquarefree 49
maxprime 13094231
maxprime_check 0
numdiv 189
numdiv_aux 60
omega 189
set_fact 10612
set_fact_check 350749
set_optimize 0
set_vexp 33509
sieve_chunk 2736
sumdigits 35
sumdigits0 105
sumdigits_block 14
sumdigitsu 355152
sumdiv 189
sumdiv_aux 53
sumdivk 672
sumdivk_aux 106
u_euler_sumdiv 557
u_euler_sumdivk 1289
uissquarefree 7978
uissquarefree_fact 168
usumdivkvec 28

Generated by: LCOV version 1.9