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 17242-6994acc) Lines: 615 727 84.6 %
Date: 2014-12-22 Functions: 78 87 89.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 338 487 69.4 %

Function Name Sort by function name Hit count Sort by hit count
RgV_is_ZV0 210
RgV_is_ZVnon0 259
RgV_is_ZVpos 324156
Z_issquarefree 764
Z_smoothen 13524
_addii 3360
_dvmdii 436
_mod4 14
_mulii 3619
_sqri 553
bigomega 189
boundfact 35
check_arith_all 169456
check_arith_non0 2543
check_arith_pos 0
check_basis 168
clean_Z_factor 168
core0 266
core2 63
core2_i 70
core2fa 455
core2partial 455
coredisc 7
coredisc0 14
coredisc2 7
corediscs 581
corefa 0
corepartial 0
digits 49
digits_dacsmall 3054
divisors 361319
divisors_init 361361
divisorsu 30276
euler_sumdiv 1970
euler_sumdivk 454
eulerphi 144193
eulerphiu 149054
eulerphiu_fact 149558
factor_pn_1 6769
factor_pn_1_limit 6769
factorlim 24059
factoru_pow 22450
fromdigits 42
fuse_Z_factor 0
gen_digits 3500
gen_digits_dac 83823
gen_digits_i 3550
gen_fromdigits 1512
gen_fromdigits_dac 18788
get_vB 5061
good_arena_size 1243
init_primepointer_geq 0
init_primepointer_gt 0
init_primepointer_leq 0
init_primepointer_lt 5790365
initprimes 1243
initprimes0 1243
initprimes1 1243
initprimetable 1243
is_Z_factor 210
is_Z_factor_i 162323
is_Z_factornon0 259
is_Z_factorpos 161854
issquarefree 105
maxprime 12520988
maxprime_check 0
numdiv 189
numdiv_aux 60
omega 189
set_fact 10612
set_fact_check 350749
set_optimize 0
set_vexp 33355
sieve_chunk 2832
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 8398
uissquarefree_fact 224
usumdivkvec 28

Generated by: LCOV version 1.9