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 18616-fe48336) Lines: 8589 11813 72.7 %
Date: 2016-02-14 Functions: 875 1132 77.3 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 4810 8233 58.4 %

Filename Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage Branches Sort by branch coverage
readline.c
0.0%
0.0 % 0 / 189 0.0 % 0 / 17 0.0 % 0 / 177
gplib.c
32.5%32.5%
32.5 % 278 / 856 46.1 % 41 / 89 23.7 % 164 / 693
default.c
48.7%48.7%
48.7 % 240 / 493 49.2 % 29 / 59 28.0 % 88 / 314
init.c
67.8%67.8%
67.8 % 785 / 1158 70.8 % 92 / 130 49.4 % 388 / 786
es.c
60.8%60.8%
60.8 % 1540 / 2534 69.3 % 201 / 290 50.7 % 966 / 1906
eval.c
72.8%72.8%
72.8 % 1006 / 1382 81.8 % 90 / 110 58.4 % 508 / 870
hash.c
79.9%79.9%
79.9 % 123 / 154 87.5 % 21 / 24 67.4 % 62 / 92
anal.c
86.4%86.4%
86.4 % 641 / 742 95.7 % 90 / 94 68.4 % 387 / 566
parse.c
69.4%69.4%
69.4 % 175 / 252 100.0 % 5 / 5 69.9 % 188 / 269
intnum.c
94.9%94.9%
94.9 % 976 / 1028 96.3 % 78 / 81 75.7 % 477 / 630
compile.c
89.3%89.3%
89.3 % 1297 / 1453 96.2 % 77 / 80 79.1 % 706 / 893
sumiter.c
96.8%96.8%
96.8 % 1010 / 1043 100.0 % 81 / 81 81.3 % 645 / 793
parsec.h
97.1%97.1%
97.1 % 100 / 103 100.0 % 17 / 17 92.3 % 24 / 26
members.c
98.7%98.7%
98.7 % 293 / 297 96.4 % 53 / 55 94.9 % 205 / 216
parse.y
96.9%96.9%
96.9 % 125 / 129 - 0 / 0 100.0 % 2 / 2

Generated by: LCOV version 1.9