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 20422-b487f4d) Lines: 1508 1704 88.5 %
Date: 2017-03-22 05:51:54 Functions: 132 139 95.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpV_factorback 686
Fpmul 77
Fppow 763
Lazard 19879
Lazard2 19593
Q_content 67751345
Q_denom 34443351
Q_div_to_int 1834
Q_divi_to_int 10645077
Q_divmuli_to_int 142051
Q_divq_to_int 160225
Q_gcd 47883778
Q_mul_to_int 0
Q_muli_to_int 11757066
Q_primitive_part 9677604
Q_primpart 1307642
Q_remove_denom 3706593
R_to_Q_down 819
R_to_Q_up 819
RgM_rescale_to_int 214598
RgXQ_charpoly 14314
RgXQ_inv 20876
RgXQ_ratlift 56
RgX_Rg_mul_i 59185
RgX_disc 1267
RgX_disc_aux 4326
RgX_extgcd 343
RgX_extgcd_simple 0
RgX_gcd 10724479
RgX_gcd_simple 777
RgX_is_irred 63
RgX_is_irred_i 63
RgX_neg_i 19593
RgX_rescale_to_int 238
RgX_resultant_all 20614
RgX_simpletype 98160
RgX_sturmpart 133
RgX_type 951907
RgX_type_decode 14770
RgX_type_is_composite 696764
ZX_content 13153
_pol_0 0
c_is_rational 35
c_zero_gcd 49
caract_const 133
centermod 4691426
centermod_i 7245281
centermodii 71602047
choosetype 575048
code 14567
cont_gcd 3088377
cont_gcd_gen 9171
cont_gcd_pol 2270810
cont_gcd_rfrac 864892
content 76167564
deg1_from_roots 81120
eltmul 4165
eltpow 16962
factor 40717
factor0 0
factorback 1164095
factorback2 1619263
fix_lcm 133
fix_pol 2254
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 589941
gcdmonome 7359315
gcdqq 545886
gdivexact 1812516
gen_factorback 1646619
ggcd 21422283
ggcd0 3952
ginvmod 3609
glcm 3066
glcm0 2891
gp_factor0 36979
idealfactorback 1141
idmul 154
idmulred 21
idpow 651
idpowred 623
inexact 25075777
init_resultant 60581
isinexactall 6762626
isirreducible 63
mul 2658280
must_negate 3178
newtonpoly 28
nextSousResultant 19593
nffactorback 13307
normalized_mul 428234
normalized_to_RgX 275164
padic_gcd 154
pol_approx0 2107
poldisc0 3073
polresultant0 1323
polresultantext 840
polresultantext0 868
polsym 8862
polsym_gen 20034
powi 4266958
primitive_part 1048928
primpart 2226
reduceddiscsmith 7
reductum_lg 56308
rescale_init 1759574
resultant2 8666
resultant_all 51915
rnfcharpoly 224
roots_from_deg1 980
roots_to_pol 250372
roots_to_pol_r1 24827
s_centermod 0
scalar_bezout 112
scalar_res 0
settype 3006148
sturmpart 833
sturmpart_i 833
subres_step 45365
subresext 0
subresext_i 21744
sylvester_col 72100
sylvestermatrix 7
sylvestermatrix_i 8673
triv_cont_gcd 357
vec_Q_primpart 97566
vecprod 14
zero_bezout 63
zero_extgcd 28
zero_gcd 8185976
zero_gcd2 8177449

Generated by: LCOV version 1.11