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 - subfield.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30622-caa25a75db) Lines: 927 946 98.0 %
Date: 2026-01-22 09:18:00 Functions: 51 51 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
RgV_negtranslate 678
RgV_translate 678
RgXY_to_RgC 37937
_subfield 1463
append 30357
bound_for_coeff 27530
calc_block 28669
chinese_retrieve_pol 28005
choose_prime 26523
cmsubfield_get_roots 1088
compute_data 27530
cycle_power_to_perm 46573
embedding 28005
field_is_contained 19474
fix_var 25626
galoissubfieldcm 208
get_bezout 26509
heap_climb 1764
heap_descend 2569
heap_pop 1421
heap_push 1232
im_block_by_perm 21307
init_primedata 26509
init_traces 26509
maxgen_subfields 287
nfsubfields 329
nfsubfields0 28321
nfsubfields_fa 259
nfsubfieldscm 1151
nfsubfieldsmax 154
ok_coeffs 35450
perm_mul_i 227100
polsimplify 35450
poltrace 31631
print_block_system 28343
quadsubfieldcm 140
rootsuptoconj 280
setvarn2 35
subfield 48682
subfield_generator 1873
subfields_cleanup 1564
subfields_get_ero 287
subfields_get_fa 592
subfields_of_given_degree 26852
subfields_poldata 26509
subfieldsall 595
test_block 48004
trace 151332
try_imag 278
try_subfield_generator 3315
twoembequation 2580

Generated by: LCOV version 1.16