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 30674-be81ecfdd4) Lines: 827 864 95.7 %
Date: 2026-02-12 09:23:52 Functions: 64 64 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Zideallog 23024
Zideallog_2k 949576
Zideallog_pk 2048931
bnr_coprime 42
char_check 121191
char_denormalize 215789
char_normalize 295484
char_simplify 296933
charconj 6678
charconj0 28
chardiv 10213
chardiv0 42
chareval 3605
chareval_i 2568979
chargalois 10493
charker 99211
charker0 35
charmul 302141
charmul0 154
charorder 1388324
charorder0 210
charpow 203
charpow0 63
checkznstar_i 3934190
coprime_tables 8015
coprimes_zv 550004
cyc2elts_normal 8043
cyc_normalize 254786
get_chi 35
get_cyc 532
lcmuu 257075
ncharvecexpo 57484
not_coprime 1855
znchar 3332
znchar_quad 303471
zncharcheck 211631
zncharconductor 24339
zncharconj 5824
znchardecompose 791
znchardiv 10220
znchareval 2570785
zncharinduce 12607
zncharisodd 197792
zncharker 21
zncharmul 302148
zncharorder 393603
zncharpow 224
znchartokronecker 847
znchartoprimitive 5572
znconrey_check 914613
znconrey_normalized 2655520
znconreychar 46767
znconreyconductor 742945
znconreyexp 260799
znconreyfromchar 142954
znconreyfromchar_normalized 153111
znconreylog 2654863
znconreylog_normalize 2662534
znlog0 294
znstar 35921
znstar0 131479
zv_charorder 101248
zv_cyc_minimal 100800
zv_cyc_minimize 46627

Generated by: LCOV version 1.16