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.0 lcov report (development 29712-7c8a932571) Lines: 685 735 93.2 %
Date: 2024-11-15 09:08:45 Functions: 37 39 94.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fp_ispower 567
Qp_ispower 1113
U2_issquare 2541
Up_ispower 651
Up_issquare 5229
Z_isanypower 7195588
Z_isanypower_101 869912
Z_isanypower_aux 7195588
Z_ispow2 529240
Z_ispowerall 1559195
Z_issquareall 6681368
Zn_ispower 756
Zn_issquare 2793
Zp_issquare 111180
gisanypower 7000182
gissquare 0
gissquareall 0
handle_pe 798
ispolygonal 1386
ispower 8555941
isprimepower 840147
isprimepower_i 842134
ispseudoprimepower 1987
issquare 229267
issquareall 252260
logint0 26330
logintall 934060
polispower 952
polissquareall 3780
polmodispower 56
rfracispower 56
split_exponent 507443
sqrtint 88457
sqrtint0 119
squaremod 14394456
uisprimepower 642865
uissquare 274803
uissquareall 10757100
ulogintall 833150

Generated by: LCOV version 1.16