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.2 lcov report (development 29401-b333f5c7d5) Lines: 685 735 93.2 %
Date: 2024-06-18 09:03:05 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 7195282
Z_isanypower_101 869930
Z_isanypower_aux 7195282
Z_ispow2 529710
Z_ispowerall 1558551
Z_issquareall 6678371
Zn_ispower 749
Zn_issquare 2793
Zp_issquare 109728
gisanypower 7000182
gissquare 0
gissquareall 0
handle_pe 777
ispolygonal 1386
ispower 8555178
isprimepower 840147
isprimepower_i 842122
ispseudoprimepower 1975
issquare 229260
issquareall 251771
logint0 26599
logintall 928964
polispower 840
polissquareall 3710
polmodispower 56
rfracispower 56
split_exponent 507453
sqrtint 88023
sqrtint0 119
squaremod 14101870
uisprimepower 642173
uissquare 274316
uissquareall 10465567
ulogintall 829323

Generated by: LCOV version 1.16