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 - language Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 17774-15dbd24) Lines: 8326 11322 73.5 %
Date: 2015-04-26 Functions: 854 1092 78.2 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 4665 7837 59.5 %

Filename Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage Branches Sort by branch coverage
gplib.c
32.6%32.6%
32.6 % 277 / 849 46.6 % 41 / 88 23.8 % 164 / 690
default.c
47.2%47.2%
47.2 % 223 / 472 48.3 % 28 / 58 27.2 % 81 / 298
es.c
61.6%61.6%
61.6 % 1548 / 2513 70.0 % 201 / 287 51.0 % 962 / 1886
init.c
66.1%66.1%
66.1 % 763 / 1155 70.0 % 91 / 130 49.0 % 385 / 785
parse.c
69.4%69.4%
69.4 % 175 / 252 100.0 % 5 / 5 69.9 % 188 / 269
eval.c
70.4%70.4%
70.4 % 939 / 1333 79.0 % 83 / 105 55.6 % 460 / 827
hash.c
79.9%79.9%
79.9 % 123 / 154 87.5 % 21 / 24 67.4 % 62 / 92
anal.c
87.7%87.7%
87.7 % 593 / 676 97.7 % 85 / 87 69.6 % 348 / 500
compile.c
89.0%89.0%
89.0 % 1283 / 1442 94.9 % 75 / 79 78.9 % 699 / 886
sumiter.c
96.7%96.7%
96.7 % 1031 / 1066 100.0 % 81 / 81 82.0 % 650 / 793
parse.y
96.9%96.9%
96.9 % 125 / 129 - 0 / 0 100.0 % 2 / 2
parsec.h
97.1%97.1%
97.1 % 100 / 103 100.0 % 17 / 17 92.3 % 24 / 26
intnum.c
97.1%97.1%
97.1 % 856 / 882 96.1 % 73 / 76 77.2 % 439 / 569
members.c
98.0%98.0%
98.0 % 290 / 296 96.4 % 53 / 55 93.9 % 201 / 214

Generated by: LCOV version 1.9