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.18.0 lcov report (development 29712-7c8a932571) Lines: 167 190 87.9 %
Date: 2024-11-15 09:08:45 Functions: 31 32 96.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
eq_id 303066
get_prime_index 55857
glue 552877060
hash_GEN 141569835
hash_create 40472
hash_create_str 3741
hash_create_ulong 1064
hash_dbg 0
hash_destroy 3696
hash_haskey_GEN 147474
hash_haskey_long 335509
hash_id 640340
hash_init 15385
hash_init_GEN 11710
hash_init_ulong 3675
hash_insert 783089
hash_insert2 1767854
hash_insert_long 54725
hash_keys 1070
hash_keys_GEN 3905
hash_link 16475
hash_link2 1784329
hash_remove 24
hash_remove_select 3010
hash_search 1652070
hash_search2 3485627
hash_select 77
hash_values 1988
hash_zv 17507
hashstr_import_static 25
setlen 60561
strequal 15862

Generated by: LCOV version 1.16