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 30861-40e9da58f9) Lines: 827 864 95.7 %
Date: 2026-05-04 09:27:01 Functions: 64 64 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
zncharker 21
charconj0 28
charker0 35
get_chi 35
bnr_coprime 42
chardiv0 42
charpow0 63
charmul0 154
charpow 203
charorder0 210
zncharpow 224
znlog0 294
get_cyc 532
znchardecompose 791
znchartokronecker 847
not_coprime 1855
znchar 3332
chareval 3605
znchartoprimitive 5572
zncharconj 5824
charconj 6678
coprime_tables 8015
cyc2elts_normal 8043
chardiv 10213
znchardiv 10220
chargalois 10493
zncharinduce 12607
Zideallog 23024
zncharconductor 24339
znstar 35963
zv_cyc_minimize 46627
znconreychar 46767
ncharvecexpo 57484
charker 99218
zv_cyc_minimal 100800
zv_charorder 101248
char_check 121198
znstar0 131521
znconreyfromchar 142954
znconreyfromchar_normalized 153111
zncharisodd 197799
zncharcheck 211638
char_denormalize 215789
cyc_normalize 254800
lcmuu 257075
znconreyexp 260799
char_normalize 295498
char_simplify 296947
charmul 302141
zncharmul 302148
znchar_quad 303471
zncharorder 393610
coprimes_zv 550004
znconreyconductor 742952
znconrey_check 914620
Zideallog_2k 949576
charorder 1388338
Zideallog_pk 2048938
chareval_i 2568979
znchareval 2570785
znconreylog 2654870
znconrey_normalized 2655520
znconreylog_normalize 2662541
checkznstar_i 3934211

Generated by: LCOV version 1.16