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.2 lcov report (development 29420-55f63b8cfe) Lines: 167 190 87.9 %
Date: 2024-07-03 09:03:24 Functions: 31 32 96.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
eq_id 303332
get_prime_index 53428
glue 538737718
hash_GEN 139613043
hash_create 40444
hash_create_str 3727
hash_create_ulong 1057
hash_dbg 0
hash_destroy 3682
hash_haskey_GEN 151919
hash_haskey_long 335474
hash_id 648957
hash_init 12984
hash_init_GEN 10492
hash_init_ulong 2492
hash_insert 787212
hash_insert2 1715782
hash_insert_long 54690
hash_keys 1063
hash_keys_GEN 2684
hash_link 16475
hash_link2 1732257
hash_remove 24
hash_remove_select 2982
hash_search 1656438
hash_search2 3433856
hash_select 70
hash_values 1981
hash_zv 17507
hashstr_import_static 25
setlen 57530
strequal 15792

Generated by: LCOV version 1.16