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 17238-ce76349) Lines: 7765 11305 68.7 %
Date: 2014-12-20 Functions: 814 1114 73.1 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 4266 7865 54.2 %

Filename Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage Branches Sort by branch coverage
compat.c
0.0%
0.0 % 0 / 60 0.0 % 0 / 29 0.0 % 0 / 35
gplib.c
28.5%28.5%
28.5 % 242 / 850 40.9 % 36 / 88 20.9 % 145 / 694
default.c
43.2%43.2%
43.2 % 204 / 472 44.8 % 26 / 58 22.8 % 68 / 298
es.c
61.4%61.4%
61.4 % 1528 / 2489 69.2 % 198 / 286 51.1 % 962 / 1884
eval.c
63.2%63.2%
63.2 % 818 / 1294 71.1 % 69 / 97 47.4 % 383 / 808
init.c
65.8%65.8%
65.8 % 759 / 1154 68.0 % 87 / 128 50.6 % 385 / 761
parse.c
69.4%69.4%
69.4 % 175 / 252 100.0 % 5 / 5 69.5 % 187 / 269
anal.c
75.1%75.1%
75.1 % 508 / 676 93.1 % 81 / 87 56.6 % 283 / 500
hash.c
79.9%79.9%
79.9 % 123 / 154 87.5 % 21 / 24 66.3 % 61 / 92
sumiter.c
80.5%80.5%
80.5 % 802 / 996 90.0 % 63 / 70 63.4 % 491 / 774
compile.c
86.6%86.6%
86.6 % 1241 / 1433 91.0 % 71 / 78 76.7 % 678 / 884
intnum.c
89.8%89.8%
89.8 % 850 / 947 94.6 % 87 / 92 63.5 % 396 / 624
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