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 - forprime.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.12.0 lcov report (development 23339-b1c33c51a) Lines: 382 451 84.7 %
Date: 2018-12-11 05:41:34 Functions: 33 38 86.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
init_primepointer_geq 0
init_primepointer_gt 0
init_primepointer_leq 0
maxprime_check 0
set_optimize 0
forcomposite 56
forcomposite_init 56
u_forprime_restrict 63
forcomposite_next 175
forprime_init 271
forprime 301
forprimestep 378
forprimestep_init 649
arith_set 1216
good_arena_size 1549
initprimes 1549
initprimes0 1549
initprimes1 1549
initprimetable 1549
pari_close_primes 1549
pari_init_primes 1549
pari_sieve_init 1549
sieve_chunk 3536
sieve_block 4559
init_modular_small 157019
u_forprime_sieve_init 2040484
optimize_chunk 2861400
sieve_init 2861400
forprime_next 8401633
init_modular_big 10909408
init_primepointer_lt 17945279
u_forprime_set_prime_table 20923370
u_forprime_init 30516064
u_forprime_arith_init 30778708
u_forprime_sieve_arith_init 32819267
maxprime 49985769
shift_cache 84664727
u_forprime_next 441459414

Generated by: LCOV version 1.13