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 - modules Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31042-0fbe168e69) Lines: 95.6 % 12493 11947
Test Date: 2026-07-23 17:04:59 Functions: 99.0 % 813 805
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 %

File Sort by file name Line Coverage Sort by line coverage Function Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
algebras.c
99.3%99.3%
99.3 % 3989 3963 99.7 % 345 344
elldata.c
94.7%94.7%
94.7 % 151 143 100.0 % 16 16
ellfromeqn.c
93.8%93.8%
93.8 % 145 136 100.0 % 11 11
ellmanin.c
93.8%93.8%
93.8 % 48 45 100.0 % 4 4
forperm.c
100.0%
100.0 % 37 37 100.0 % 4 4
forsubset.c
100.0%
100.0 % 56 56 100.0 % 7 7
galois.c
96.2%96.2%
96.2 % 1861 1790 97.3 % 74 72
galpol.c
83.3%83.3%
83.3 % 54 45 100.0 % 4 4
genus2red.c
91.6%91.6%
91.6 % 1559 1428 100.0 % 60 60
groupid.c
85.3%85.3%
85.3 % 224 191 87.5 % 8 7
krasner.c
98.0%98.0%
98.0 % 442 433 100.0 % 35 35
part.c
81.5%81.5%
81.5 % 189 154 92.3 % 13 12
ratpoints.c
96.7%96.7%
96.7 % 911 881 100.0 % 33 33
stark.c
92.7%92.7%
92.7 % 1838 1704 98.5 % 134 132
thue.c
95.1%95.1%
95.1 % 989 941 98.5 % 65 64

Generated by: LCOV version 2.0-1