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-03 09:18:42 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 15230
adjust_orientation 6215
adjust_signs 10841
best_torsion_constraint 140846
check_modinv 2800
classgp_make_pcp 4889
classgp_pcp_check_generators 4370
distinct_inverses 987
evec_clear 4979
evec_compose 518
evec_copy 12220
evec_equal 231
evec_inverse 175
evec_inverse_o 707
evec_n_to_m 4349
evec_order 5550
evec_orders 4349
evec_reduce 21047
evec_ri 13223
evec_ri_mutate 5641
evec_to_index 10543
factor_uv 189728
famatsmall_divexact 3035
find_j_inv_with_given_trace 141004
find_jinv 140834
hasse_bounds 140877
hclassno_wrapper 194617
height_margin 4889
index_to_evec 1372
logfac 0
modinv_has_sign_ambiguity 4889
modinv_inverted_involution 2083
modinv_negated_involution 2083
modinv_units 3879
next_generator 5571
next_prime_evec 1225
norm_eqn_set 178444
oneroot_of_classpoly 141232
orient_pcp 280
oriented_n_action 6215
pcp_get_D 149378
pcp_get_D0 194617
pcp_get_L 9351
pcp_get_L0 9351
pcp_get_fau 4889
pcp_get_h 194617
pcp_get_inv 149604
pcp_get_k 11384
pcp_get_m 6768
pcp_get_n 6495
pcp_get_o 6495
pcp_get_orient_p 6768
pcp_get_orient_q 6768
pcp_get_orient_reps 6495
pcp_get_r 6495
pcp_get_u 139608
polclass 2177
polclass0 6394
polclass_psum 574
polclass_roots_modp 139544
polclass_small_disc 1505
polclass_worker 139644
primecmp 1237943
quadnegclassnou 4889
random_FleV 871193
select_classpoly_prime_pool 4889
select_classpoly_primes 4889
test_curve_order 168981
torsion_constraint 420890
upper_bound_on_classpoly_coeffs 4889
vecsmall_isin_skip 7635
verify_2path 672
verify_edge 3656

Generated by: LCOV version 1.16