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 - base4.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 17953-c39f2e6) Lines: 1339 1428 93.8 %
Date: 2015-08-28 Functions: 124 131 94.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 795 948 83.9 %

Function Name Sort by function name Hit count Sort by hit count
RM_round_maxrank 30185
ZM_Q_mul 48711
ZM_famat_limit 34951
_idealmulred 44849
_idealsqrred 65794
_mul 28554
_sqr 65794
addmul_col 56182
addmul_mat 25327
append 99411
check_listpr 756
chk_vdir 21
coprime_part 5676
elt_cmp 19950
elt_egal 6069
err_divexact 7
ext_inv 4469
ext_mul 165521
ext_pow 266
ext_sqr 65780
extideal_HNF_mul 18863
factor_norm 26644
factorbackprime 6447
famat_Z_gcd 0
famat_add 122905
famat_inv 4609
famat_inv_shallow 7
famat_makecoprime 98637
famat_mul 176954
famat_mul_shallow 3024
famat_pow 2863
famat_reduce 7140
famat_sqr 55231
famat_to_Fp_simple 385
famat_to_Fq_simple 0
famat_to_nf 0
famat_to_nf_moddivisor 12418
famatsmall_reduce 8805
get_random_a 165499
gpidealval 42
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 28
hnf_Z_QC 21
hnf_Z_ZC 28
idealadd 28210
idealaddmultoone 35
idealaddtoone 2709
idealaddtoone0 70
idealaddtoone_i 182543
idealappr 770
idealappr0 14
idealapprfact 756
idealapprfact_i 17544
idealchinese 1449
idealcoprime 63
idealcoprimefact 5096
idealdiv 15519
idealdiv0 35
idealdivexact 2226
idealdivpowprime 3990
idealfactor 28849
idealfactor_HNF 26644
idealhnf 2653
idealhnf0 119
idealhnf_principal 139025
idealhnf_shallow 275930
idealhnf_two 1288443
idealintersect 21
idealinv 48121
idealinv_HNF 32261
idealinv_HNF_aux 32905
idealmin 7
idealmul 526720
idealmul0 28
idealmul_HNF 349126
idealmul_HNF_two 688551
idealmul_aux 592514
idealmulelt 138519
idealmulpowprime 37779
idealmulred 16295
idealnorm 10093
idealnumden 26672
idealpow 330244
idealpow0 42
idealpow_aux 330244
idealpowprime 233835
idealpowred 53293
idealpows 13489
idealprodprime 0
idealred0 149767
idealsqr 65794
idealtwoelt 14748
idealtwoelt0 63
idealtwoelt2 42
idealtyp 2705394
idealval 347485
init_unif_mod_fZ 21975
isideal 84
make_integral 4417
mat_ideal_two_elt 344627
mat_ideal_two_elt2 21
merge_fact 21
nf_coprime_part 112
nf_get_Gtwist 21
nf_get_Gtwist1 26195
nf_to_Fp_simple 3640
nf_to_Fq_simple 0
nfdivmodpr 588
nfkermodpr 14
nfmulmodpr 595
nfpowmodpr 168
nfsolvemodpr 21
not_in_ideal 14
ok_elt 208524
pidealprimeinv 1727
to_Fp_simple 3444
to_Fq_simple 0
to_famat 770
to_famat_shallow 58367
trivial_merge 28
twistG 26237
ucoprime_part 473249
unif_mod_fZ 31292
unnf_minus_x 172596
val_norm 368620
vec_mulid 7
vecdiv 903
vecinv 0
vecmul 177527
vecpow 15127

Generated by: LCOV version 1.9