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 - polclass.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30603-c72b2decfc) Lines: 825 846 97.5 %
Date: 2026-01-07 09:21:48 Functions: 72 73 98.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Flv_powsum_pre 14924
adjust_orientation 6398
adjust_signs 10780
best_torsion_constraint 148356
check_modinv 2828
classgp_make_pcp 5001
classgp_pcp_check_generators 4461
distinct_inverses 987
evec_clear 5133
evec_compose 518
evec_copy 12529
evec_equal 231
evec_inverse 196
evec_inverse_o 707
evec_n_to_m 4440
evec_order 5634
evec_orders 4440
evec_reduce 21377
evec_ri 12957
evec_ri_mutate 5634
evec_to_index 10726
factor_uv 195358
famatsmall_divexact 1972
find_j_inv_with_given_trace 148506
find_jinv 148318
hasse_bounds 148443
hclassno_wrapper 200359
height_margin 5001
index_to_evec 1379
logfac 0
modinv_has_sign_ambiguity 5001
modinv_inverted_involution 2065
modinv_negated_involution 2065
modinv_units 3964
next_generator 5613
next_prime_evec 1225
norm_eqn_set 188770
oneroot_of_classpoly 148801
orient_pcp 287
oriented_n_action 6398
pcp_get_D 157153
pcp_get_D0 200359
pcp_get_L 9566
pcp_get_L0 9566
pcp_get_fau 5001
pcp_get_h 200359
pcp_get_inv 157341
pcp_get_k 11686
pcp_get_m 6965
pcp_get_n 6685
pcp_get_o 6685
pcp_get_orient_p 6965
pcp_get_orient_q 6965
pcp_get_orient_reps 6685
pcp_get_r 6685
pcp_get_u 147170
polclass 2184
polclass0 6506
polclass_psum 560
polclass_roots_modp 147034
polclass_small_disc 1505
polclass_worker 147183
primecmp 1305422
quadnegclassnou 5001
random_FleV 914200
select_classpoly_prime_pool 5001
select_classpoly_primes 5001
test_curve_order 177599
torsion_constraint 443719
upper_bound_on_classpoly_coeffs 5001
vecsmall_isin_skip 7630
verify_2path 672
verify_edge 3656

Generated by: LCOV version 1.16