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 - char.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 827 864 95.7 %
Date: 2026-02-23 02:23:56 Functions: 64 64 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
zncharker 18
charconj0 24
charker0 30
get_chi 30
bnr_coprime 36
chardiv0 36
charpow0 54
charmul0 116
charpow 174
charorder0 177
zncharpow 192
znlog0 216
get_cyc 437
znchardecompose 645
znchartokronecker 726
not_coprime 1585
znchar 2851
chareval 3027
znchartoprimitive 4731
zncharconj 4992
charconj 5622
coprime_tables 6817
cyc2elts_normal 6837
chardiv 8754
znchardiv 8760
chargalois 8935
zncharinduce 10753
zncharconductor 18174
Zideallog 19708
znstar 30700
zv_cyc_minimize 39966
znconreychar 40068
ncharvecexpo 49266
charker 81992
zv_cyc_minimal 83164
zv_charorder 83484
char_check 103513
znstar0 112507
znconreyfromchar 119845
znconreyfromchar_normalized 128538
zncharisodd 169476
char_denormalize 179069
zncharcheck 181250
lcmuu 210876
cyc_normalize 212366
znconreyexp 223513
char_normalize 241542
char_simplify 242775
charmul 258962
zncharmul 258968
znchar_quad 260115
zncharorder 337359
coprimes_zv 471067
znconreyconductor 633966
znconrey_check 783796
Zideallog_2k 813750
charorder 1189824
Zideallog_pk 1755556
chareval_i 2201923
znchareval 2203466
znconreylog 2272507
znconrey_normalized 2276084
znconreylog_normalize 2282104
checkznstar_i 3365865

Generated by: LCOV version 1.16