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 - language - hash.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.1 lcov report (development 28676-df828f1c94) Lines: 160 183 87.4 %
Date: 2023-08-26 07:54:43 Functions: 30 31 96.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
eq_id 303332
get_prime_index 37718
glue 517265581
hash_GEN 129092700
hash_create 27431
hash_create_str 3643
hash_create_ulong 1057
hash_dbg 0
hash_destroy 3598
hash_haskey_GEN 151917
hash_haskey_long 335447
hash_id 648957
hash_init 10287
hash_init_GEN 9144
hash_init_ulong 1143
hash_insert 572753
hash_insert2 1418867
hash_insert_long 54641
hash_keys 2353
hash_link 16475
hash_link2 1435342
hash_remove 24
hash_remove_select 2954
hash_search 1655562
hash_search2 3209011
hash_select 70
hash_values 1939
hash_zv 17507
hashstr_import_static 25
setlen 40976
strequal 15762

Generated by: LCOV version 1.14