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.16.1 lcov report (development 28676-df828f1c94) Lines: 686 736 93.2 %
Date: 2023-08-26 07:54:43 Functions: 37 39 94.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fp_ispower 553
Qp_ispower 1113
U2_issquare 2541
Up_ispower 637
Up_issquare 5229
Z_isanypower 7001904
Z_isanypower_aux 7001904
Z_isanypower_nosmalldiv 865669
Z_ispow2 198857
Z_ispowerall 1551854
Z_issquareall 5633696
Zn_ispower 749
Zn_issquare 2793
Zp_issquare 108726
gisanypower 7000182
gissquare 0
gissquareall 0
handle_pe 777
ispolygonal 1386
ispower 8548080
isprimepower 840147
isprimepower_i 842157
ispseudoprimepower 2010
issquare 229256
issquareall 251595
logint0 36623
logintall 864676
polispower 833
polissquareall 3731
polmodispower 56
rfracispower 56
split_exponent 505736
sqrtint 87346
sqrtint0 119
squaremod 19637547
uisprimepower 640946
uissquare 274189
uissquareall 16743555
ulogintall 765700

Generated by: LCOV version 1.14