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 - polarit2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.10.0 lcov report (development 20777-d2a9243) Lines: 1523 1705 89.3 %
Date: 2017-06-25 05:59:24 Functions: 132 139 95.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpV_factorback 96320
Fpmul 23870
Fppow 120190
Lazard 20551
Lazard2 20335
Q_content 73637092
Q_denom 56458602
Q_div_to_int 3073
Q_divi_to_int 11690672
Q_divmuli_to_int 158053
Q_divq_to_int 218702
Q_gcd 51421232
Q_mul_to_int 0
Q_muli_to_int 21027217
Q_primitive_part 10300354
Q_primpart 1379778
Q_remove_denom 11296720
R_to_Q_down 819
R_to_Q_up 819
RgM_rescale_to_int 222557
RgXQ_charpoly 14391
RgXQ_inv 24776
RgXQ_ratlift 56
RgX_Rg_mul_i 61306
RgX_disc 1687
RgX_disc_aux 4746
RgX_extgcd 343
RgX_extgcd_simple 0
RgX_gcd 10792519
RgX_gcd_simple 777
RgX_is_irred 63
RgX_is_irred_i 63
RgX_neg_i 20335
RgX_rescale_to_int 238
RgX_resultant_all 21314
RgX_simpletype 102969
RgX_sturmpart 133
RgX_type 1059948
RgX_type_decode 14826
RgX_type_is_composite 804385
ZX_content 13153
_pol_0 0
c_is_rational 35
c_zero_gcd 49
caract_const 140
centermod 4802052
centermod_i 8368338
centermodii 86341568
choosetype 575527
code 14588
cont_gcd 3093494
cont_gcd_gen 13322
cont_gcd_pol 2271783
cont_gcd_rfrac 864892
content 77075147
deg1_from_roots 82709
eltmul 4165
eltpow 16962
factor 41182
factor0 0
factorback 1180438
factorback2 15665411
fix_lcm 133
fix_pol 2394
gauss_cmp 77
gauss_factor 42
gauss_factor_p 35
gauss_gcd 28
gauss_normal 91
gauss_primpart 42
gauss_primpart_try 70
gbezout 280
gcdext0 280
gcdiq 699802
gcdmonome 7426802
gcdqq 673892
gdivexact 2006634
gen_factorback 15791817
ggcd 21469559
ggcd0 3960
ginvmod 2660
glcm 3276
glcm0 2891
gp_factor0 37017
idealfactorback 1799
idmul 2142
idmulred 21
idpow 3283
idpowred 623
inexact 25086830
init_resultant 62863
isinexactall 6764544
isirreducible 63
mul 35637233
must_negate 3437
newtonpoly 28
nextSousResultant 20335
nffactorback 13307
normalized_mul 414604
normalized_to_RgX 264723
padic_gcd 182
pol_approx0 2107
poldisc0 3073
polresultant0 1393
polresultantext 840
polresultantext0 868
polsym 17472
polsym_gen 29540
powi 51280993
primitive_part 1085271
primpart 2485
reduceddiscsmith 7
reductum_lg 58429
rescale_init 1818283
resultant2 8666
resultant_all 54197
rnfcharpoly 224
roots_from_deg1 980
roots_to_pol 239511
roots_to_pol_r1 25247
s_centermod 0
scalar_bezout 112
scalar_res 0
settype 3107848
sturmpart 833
sturmpart_i 833
subres_step 53698
subresext 0
subresext_i 25644
sylvester_col 72100
sylvestermatrix 7
sylvestermatrix_i 8673
triv_cont_gcd 357
vec_Q_primpart 98967
vecprod 14
zero_bezout 63
zero_extgcd 28
zero_gcd 8192154
zero_gcd2 8177022

Generated by: LCOV version 1.11