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 17932-6fdb233) Lines: 8551 11553 74.0 %
Date: 2015-08-04 Functions: 868 1104 78.6 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 4787 8003 59.8 %

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.0%47.0%
47.0 % 223 / 474 48.3 % 28 / 58 27.0 % 81 / 300
es.c
61.6%61.6%
61.6 % 1548 / 2513 70.0 % 201 / 287 51.0 % 962 / 1886
init.c
67.8%67.8%
67.8 % 783 / 1155 70.8 % 92 / 130 49.5 % 388 / 784
parse.c
69.4%69.4%
69.4 % 175 / 252 100.0 % 5 / 5 69.9 % 188 / 269
eval.c
72.5%72.5%
72.5 % 988 / 1363 81.3 % 87 / 107 57.8 % 494 / 855
hash.c
79.9%79.9%
79.9 % 123 / 154 87.5 % 21 / 24 67.4 % 62 / 92
anal.c
86.0%86.0%
86.0 % 634 / 737 95.7 % 90 / 94 68.1 % 384 / 564
compile.c
89.0%89.0%
89.0 % 1283 / 1442 94.9 % 75 / 79 78.9 % 699 / 886
intnum.c
95.2%95.2%
95.2 % 970 / 1019 97.5 % 77 / 79 75.6 % 479 / 634
sumiter.c
96.7%96.7%
96.7 % 1032 / 1067 100.0 % 81 / 81 82.3 % 659 / 801
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
members.c
98.0%98.0%
98.0 % 290 / 296 96.4 % 53 / 55 93.9 % 201 / 214

Generated by: LCOV version 1.9