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 - kernel/none - halfgcd.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30773-2078653b96) Lines: 215 219 98.2 %
Date: 2026-04-04 09:27:12 Functions: 20 20 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
mulqab 74
matid2 957
lastq 1455
mulqi 1455
ZM2_sqr 2338
mulT 8092
HGCD_split 127255
FIXUP0 134866
FIXUP1 195231
mulq 3063768
ZM_inv2 6180121
halfgcdii 6182977
signdet 6375216
ZM2_mul 7523367
HGCD_basecase 14986880
HGCD 15113784
magic_threshold 23095650
isint2n 23163746
uexpi 23164100
HGCD0 29279877

Generated by: LCOV version 1.16