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-bordeaux1.fr machine (x86_64 architecture), and agregate them in the final report:

The target is 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 - kernel/none Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 16358-a11f489) Lines: 3067 3372 91.0 %
Date: 2014-04-11 Functions: 346 414 83.6 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 2752 3634 75.7 %

Filename Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage Branches Sort by branch coverage
add.c
89.9%89.9%
89.9 % 187 / 208 83.3 % 10 / 12 88.4 % 176 / 199
addll.h
100.0%
100.0 % 16 / 16 100.0 % 4 / 4 100.0 % 12 / 12
bfffo.h
100.0%
100.0 % 8 / 8 100.0 % 1 / 1 100.0 % 8 / 8
cmp.c
95.2%95.2%
95.2 % 59 / 62 100.0 % 7 / 7 77.8 % 84 / 108
divll.h
100.0%
100.0 % 34 / 34 100.0 % 1 / 1 100.0 % 18 / 18
gcd.c
100.0%
100.0 % 55 / 55 100.0 % 3 / 3 97.1 % 67 / 69
gcdext.c
97.9%97.9%
97.9 % 94 / 96 100.0 % 1 / 1 92.1 % 105 / 114
gcdll.c
96.1%96.1%
96.1 % 342 / 356 100.0 % 13 / 13 49.8 % 316 / 635
invmod.c
96.2%96.2%
96.2 % 51 / 53 100.0 % 2 / 2 88.1 % 37 / 42
level1.h
76.1%76.1%
76.1 % 523 / 687 74.3 % 182 / 245 67.7 % 403 / 595
mp.c
96.6%96.6%
96.6 % 1085 / 1123 100.0 % 69 / 69 87.2 % 977 / 1121
mp_indep.c
90.1%90.1%
90.1 % 500 / 555 94.2 % 49 / 52 75.6 % 471 / 623
mulll.h
100.0%
100.0 % 25 / 25 100.0 % 2 / 2 - 0 / 0
ratlift.c
93.6%93.6%
93.6 % 88 / 94 100.0 % 2 / 2 86.7 % 78 / 90

Generated by: LCOV version 1.9