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 - ispower.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30590-f14e077362) Lines: 630 666 94.6 %
Date: 2026-01-02 09:20:44 Functions: 34 36 94.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
gissquare 0
gissquareall 0
polmodispower 56
rfracispower 56
sqrtint0 119
Fp_ispower 651
polispower 1008
Qp_ispower 1043
ispolygonal 1386
ispseudoprimepower 1981
U2_issquare 2541
Zn_issquare 2877
polissquareall 3780
Up_issquare 5229
logint0 26834
sqrtint 88961
Zp_issquare 111180
issquare 229267
issquareall 252289
uissquare 274886
split_exponent 507441
Z_ispow2 586885
uisprimepower 643365
ulogintall 837368
isprimepower 840147
isprimepower_i 842128
Z_isanypower_101 870391
logintall 938627
Z_ispowerall 1561632
Z_issquareall 6675228
gisanypower 7000182
Z_isanypower 7196052
Z_isanypower_aux 7196052
ispower 8558377
uissquareall 10754942
squaremod 14386821

Generated by: LCOV version 1.16