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 29115-f22e516b23) Lines: 167 190 87.9 %
Date: 2024-03-19 08:06:49 Functions: 31 32 96.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
hash_dbg 0
hash_remove 24
hashstr_import_static 25
hash_select 70
hash_init_ulong 1005
hash_create_ulong 1057
hash_keys 1063
hash_keys_GEN 1152
hash_values 1960
hash_remove_select 2982
hash_destroy 3640
hash_create_str 3685
hash_init_GEN 9005
hash_init 10010
strequal 15792
hash_link 16475
hash_zv 17507
hash_create 27473
get_prime_index 37483
setlen 40596
hash_insert_long 54690
hash_haskey_GEN 151919
eq_id 303332
hash_haskey_long 335474
hash_insert 572609
hash_id 648957
hash_insert2 1400040
hash_link2 1416515
hash_search 1655591
hash_search2 3190309
hash_GEN 133452275
glue 539316188

Generated by: LCOV version 1.14