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 - quad.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 689 731 94.3 %
Date: 2026-02-23 02:23:56 Functions: 57 61 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Zn_sqrtall 0
qfi_log 0
unegquadclassnoF 0
uposquadclassnoF 0
prod_fm 5
quadunit_uv 5
classno2 38
quadregulator 38
hclassno 41
quadclassnoF_fact 42
quadunit_mod 70
quadunit_uvmod 70
quadunitindex_i 70
quadunitindex 80
split_lcm 130
update_g1 130
ok_q 215
relative_order 250
qfbclassno0 334
quadclassnoF_u 482
get_forms 486
two_rank 486
quadclassnoF 524
Shanks_order 556
classno 598
geomsum 695
geomsumu 695
fa_isfundamental 1206
fa_quaddisc 1496
quaddisc 2106
find_order 3876
equal1 4060
uquadclassnoF_fact 5441
usumpow 7811
sqr_primeform 9209
quadunit_q 10440
uposisfundamental 13376
ui_pow 14945
Z_isfundamental 16839
isfundamental 17638
quadunitindex_ii 18960
quadclassnoEuler_fact 19002
sisfundamental 21522
unegisfundamental 25806
ui_equal1 31395
hclassno6_large 43346
hclassnoF_fact 43346
quadunitnorm 49310
quadunit_uv_basecase 49311
quadunit 49321
quadunit0 49321
hclassno6 94636
uhclassnoF_fact 128720
qfi_Shanks 560712
Zn_quad_roots 1827403
qfi_order 2600370
qfi_comp 5459561
qfi_pow 7995951
qfb_equal1 9227345
update_f 15143094
update_fm 15257670

Generated by: LCOV version 1.16