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 17097-9391e68) Lines: 615 727 84.6 %
Date: 2014-11-21 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 150
RgV_is_ZVnon0 185
RgV_is_ZVpos 221478
Z_issquarefree 760
Z_smoothen 6890
_addii 2400
_dvmdii 312
_mod4 10
_mulii 2585
_sqri 395
bigomega 135
boundfact 25
check_arith_all 121035
check_arith_non0 1996
check_arith_pos 0
check_basis 120
clean_Z_factor 120
core0 190
core2 45
core2_i 50
core2fa 110
core2partial 110
coredisc 5
coredisc0 10
coredisc2 5
corediscs 415
corefa 0
corepartial 0
digits 35
digits_dacsmall 2180
divisors 258085
divisors_init 258115
divisorsu 21511
euler_sumdiv 1414
euler_sumdivk 338
eulerphi 102995
eulerphiu 106271
eulerphiu_fact 106581
factor_pn_1 4730
factor_pn_1_limit 4730
factorlim 16950
factoru_pow 15925
fromdigits 30
fuse_Z_factor 0
gen_digits 2500
gen_digits_dac 59875
gen_digits_i 2536
gen_fromdigits 1080
gen_fromdigits_dac 13420
get_vB 3615
good_arena_size 892
init_primepointer_geq 0
init_primepointer_gt 0
init_primepointer_leq 0
init_primepointer_lt 4181475
initprimes 892
initprimes0 892
initprimes1 892
initprimetable 892
is_Z_factor 150
is_Z_factor_i 110914
is_Z_factornon0 185
is_Z_factorpos 110579
issquarefree 65
maxprime 9087163
maxprime_check 0
numdiv 135
numdiv_aux 44
omega 135
set_fact 7580
set_fact_check 250535
set_optimize 0
set_vexp 23825
sieve_chunk 2128
sumdigits 25
sumdigits0 75
sumdigits_block 10
sumdigitsu 253680
sumdiv 135
sumdiv_aux 39
sumdivk 480
sumdivk_aux 78
u_euler_sumdiv 391
u_euler_sumdivk 907
uissquarefree 5784
uissquarefree_fact 135
usumdivkvec 20

Generated by: LCOV version 1.9