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 30316-0578a48613) Lines: 825 846 97.5 %
Date: 2025-06-02 09:19:41 Functions: 72 73 98.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
logfac 0
evec_inverse 175
evec_equal 231
orient_pcp 280
evec_compose 518
polclass_psum 574
verify_2path 672
evec_inverse_o 707
distinct_inverses 987
next_prime_evec 1225
index_to_evec 1372
polclass_small_disc 1505
modinv_inverted_involution 2082
modinv_negated_involution 2082
polclass 2177
check_modinv 2800
famatsmall_divexact 3037
verify_edge 3656
modinv_units 3879
evec_n_to_m 4349
evec_orders 4349
classgp_pcp_check_generators 4370
classgp_make_pcp 4889
height_margin 4889
modinv_has_sign_ambiguity 4889
pcp_get_fau 4889
quadnegclassnou 4889
select_classpoly_prime_pool 4889
select_classpoly_primes 4889
upper_bound_on_classpoly_coeffs 4889
evec_clear 4979
evec_order 5550
next_generator 5571
evec_ri_mutate 5641
adjust_orientation 6215
oriented_n_action 6215
polclass0 6394
pcp_get_n 6495
pcp_get_o 6495
pcp_get_orient_reps 6495
pcp_get_r 6495
pcp_get_m 6768
pcp_get_orient_p 6768
pcp_get_orient_q 6768
vecsmall_isin_skip 7635
pcp_get_L 9351
pcp_get_L0 9351
evec_to_index 10543
adjust_signs 10841
pcp_get_k 11384
evec_copy 12220
evec_ri 13187
Flv_powsum_pre 15230
evec_reduce 21047
polclass_roots_modp 139540
pcp_get_u 139616
polclass_worker 139643
find_jinv 140782
best_torsion_constraint 140791
hasse_bounds 140885
find_j_inv_with_given_trace 140962
oneroot_of_classpoly 141242
pcp_get_D 149386
pcp_get_inv 149604
test_curve_order 168987
norm_eqn_set 178457
factor_uv 189728
hclassno_wrapper 194617
pcp_get_D0 194617
pcp_get_h 194617
torsion_constraint 420984
random_FleV 871035
primecmp 1237943

Generated by: LCOV version 1.16