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 - grossenchar.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30862-ea47bd413c) Lines: 1033 1048 98.6 %
Date: 2026-05-05 09:26:54 Functions: 66 66 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
eulerf_gchar 28
gchar_algebraic_basis 70
gcharlog 70
col_2ei 112
gchar_algebraicnormtype 154
gcharisalgebraic 189
gchar_algebraicoftype 210
gchar_conductor 224
gchari_conductor 224
cm_select 231
gcharalgebraic 280
gcharlocal 497
lfungchar 519
bestS 637
compute_Lcyc 637
gcharDLdata 637
gchar_hnfreduce_shallow 637
gchar_snfbasis_shallow 637
localstar 637
gcharinit 658
lll_block 740
vecan_gchar 840
hnf_block 1239
rowreverse 1239
conductor_expo_pr 1358
cleanup_vga 1590
gchari_lfun 1639
gcharduallog 1799
gcharmat_tinverse 1827
gcharlog_conductor_f 1856
gchar_Sval 1925
gchar_nflog 1925
gcharmatnewprec_shallow 1996
sprk_get_ncp 2051
gcharnewprec 2107
gcharnewprec_i 2107
check_gchari 2507
safelgcols 2507
shallowmatinsert 2586
vec_v0 2586
mextraprec 3006
gchar_identify_i 3941
gchareval 3969
gchar_identify 4011
gchar_identify_init 4011
same_arg 4795
vaffect_shallow 4795
shallow_clean_rat 5048
embedcol 6713
check_gchar 7197
gchar_internal 7197
is_gchar_group 9038
gchari_duallog 9136
check_gchar_i 9683
check_gchar_group 11558
check_localstar 13651
_check_gchar_group 13665
gcharlog_conductor_oo 17130
RgV_frac_inplace 24410
gchari_eval 188692
gchar_log 192479
gcharisprincipal 192479
gchar_logm 194404
nfembedlog 199199
gcharlog_eval_raw 203350
gaddmul 2498657

Generated by: LCOV version 1.16