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 to exceed 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 - base2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 29877-9124a6ce27) Lines: 2231 2372 94.1 %
Date: 2025-01-18 09:08:44 Functions: 174 178 97.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FqV_to_nfV 0
ZpX_primedec 0
errprime 0
rnfsimplifybasis 0
nfmodprinit 7
rnfhnfbasis 7
rnfisfree 7
rnfdet 14
FqX_non_root 21
rnfbasis 21
rnfsteinitz 28
gen_if_principal 35
poldiscfactors 42
RgV_nffix 49
get_module 63
nfidealdet1 63
nfmodprinit0 77
nfmodprlift 77
rnfdiscf 77
compositum 91
rnfdedekind 91
Z_fac 183
QXQV_to_FpM 203
checkmodpr 210
nfreducemodpr 210
get_coprimes 294
nfmodpr 350
idealprimedec_degrees 371
ZpX_monic_factor 490
fix_PE 498
nfcompositum_lambda 504
ZpX_round4 770
expo_is_squarefree 812
rnfdisc_factored 854
nfbasis 938
ZpX_monic_factor_squarefree 1071
rnfjoinmodules 1231
triv_order 1345
RgX_to_algX 1638
nfX_to_monic 1652
nfM_to_FqM 1798
rnfjoinmodules_i 2022
p_is_prime 2240
update_fact 2351
rnfallbase 2702
get_d 2751
FqM_to_nfM 2826
compositum2 2884
minval 3688
rnfmaxord 3773
pr_factorback 3815
pr_factorback_scal 3815
nfX_sub 3829
rnfdedekind_i 3857
fact_from_factors 4011
fill 4044
ffdegree 4109
_msqr 4130
modpr_genFq 4438
FpX_radical 5685
rnfeltid_powmod 5739
nfXisintegral 6545
idealprimedec_galois 6552
nfpolisintegral 7875
nfpolisintegral_i 7875
ideal_is1 7880
nfX_to_FqX 8771
FqX_to_nfX 9498
polcompositum0 12844
nfcompositum 13390
safe_Z_pvalrem 13986
_sqr 16105
nfXQ_mul 16407
nfX_rem 16407
zk_to_Fq_init 18746
nfX_mul 20236
compositum_fix 26551
nf_pV_to_prVV 26614
nfisintegral 28504
nf_pV_to_prV 38605
indexpartial 44113
redelt 48458
testc2 48458
ZX_rescale_inv 59872
redelt_i 64236
nfdisc 66460
testb2 67119
ZpX_sylvester_echelon 73962
lift_to_zk 91951
diag_denom 99485
nfmaxord 101729
pol_min 117698
get_modpr 137746
get_powers 159464
nfV_to_FqV 167403
zkmodprinit 175445
ZpX_disc_val 184154
init_norm 214592
pradical 214613
get_LV 214616
primedec_end 214616
fnz 221419
loop 238302
Zlx_gcd 246106
Decomp 254715
ZpX_gcd 254718
update_phi 276227
compmod 286758
uniformizer 296993
get_gamma 302726
Fp_basis 307413
RgX_nffix 309168
ei_msqr_mod 347677
get_g 355790
progress 393819
get_pr 411991
ZpM_hnfmodid 454011
maxord_i 454780
split_char 479598
is_uniformizer 503361
get_norm 503366
idealprimedec_limit_norm 505225
QpXV_denom 508856
get_partial_order_as_pols 508863
getprime 562531
dbasis 619616
vstar 623139
get_nu 640243
nfdiscfactors 644777
diag_denomval 685748
newtoncharpoly 698208
mul_intersect 702836
manage_cache 704927
mycaract 704984
newtonsums 704996
maxord_disc 711229
pow_ei_mod_p 738854
setPE 746435
poldiscfactors_i 788583
set_disc 812917
get_maxord 812955
nfmaxord_check_args 812957
sqr_mod 822488
Rg_nffix 919848
ZpX_reduced_resultant_fast 931361
get_prid 939106
pr_anti_uniformizer 966755
ZpX_reduced_resultant 992598
dim1proj 1030110
modprinit 1158204
idealprimedec 1273337
zx_z_div 1531282
ZX_Dedekind 1536988
maxord 1536989
Flx_radical 1599588
Flx_checkdeflate 1599612
QpX_remove_denom 1740936
idealprimedec_limit_f 2700878
primedec_aux 2707787
QpX_denom 2748820
Fq_to_nf 3083506
ZpX_resultant_val 3450289
ZpX_resultant_val_i 3495619
nf_to_Fq_init 3511725
modpr_TAU 3512921
to_ff_init 3530479
update_den 3564812
idealprimedec_kummer 3799871
mk_pr 4257478
ok_modpr 4362910
init_m 4381579
Zlx_sylvester_echelon 4669019
zk_to_Fq 6394551
nf_to_Fq 12638756
gc_nf_to_Fq 13899046
nf_to_Fq_i 13899561
checkprid 17911610
checkprid_i 22881047

Generated by: LCOV version 1.16