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 16791-0d1274a) Lines: 7739 10229 75.7 %
Date: 2014-09-16 Functions: 828 988 83.8 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 4267 7145 59.7 %

Filename Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage Branches Sort by branch coverage
default.c
41.0%41.0%
41.0 % 184 / 449 45.6 % 26 / 57 22.4 % 68 / 303
hash.c
65.0%65.0%
65.0 % 76 / 117 81.2 % 13 / 16 51.5 % 35 / 68
parse.c
66.3%66.3%
66.3 % 167 / 252 100.0 % 5 / 5 68.5 % 185 / 270
eval.c
67.6%67.6%
67.6 % 858 / 1269 76.3 % 71 / 93 52.1 % 416 / 798
anal.c
69.7%69.7%
69.7 % 424 / 608 88.7 % 63 / 71 54.5 % 274 / 503
init.c
70.6%70.6%
70.6 % 811 / 1149 75.0 % 96 / 128 53.8 % 418 / 777
es.c
72.8%72.8%
72.8 % 1769 / 2431 84.2 % 235 / 279 56.8 % 1066 / 1878
sumiter.c
80.5%80.5%
80.5 % 799 / 993 90.0 % 63 / 70 63.4 % 486 / 766
compile.c
86.7%86.7%
86.7 % 1225 / 1413 93.3 % 70 / 75 76.7 % 670 / 873
intnum.c
89.8%89.8%
89.8 % 850 / 947 94.6 % 87 / 92 63.5 % 396 / 624
compat.c
90.0%90.0%
90.0 % 54 / 60 96.6 % 28 / 29 68.6 % 24 / 35
parsec.h
92.2%92.2%
92.2 % 107 / 116 100.0 % 18 / 18 76.5 % 26 / 34
parse.y
96.9%96.9%
96.9 % 125 / 129 - 0 / 0 100.0 % 2 / 2
members.c
98.0%98.0%
98.0 % 290 / 296 96.4 % 53 / 55 93.9 % 201 / 214

Generated by: LCOV version 1.9