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-bordeaux.fr machine (x86_64 architecture), and agregate them in the final report:

The target is to exceed 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.12.1 lcov report (development 24988-2584e74448) Lines: 10371 13454 77.1 %
Date: 2020-01-26 05:57:03 Functions: 1061 1321 80.3 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 %

Filename Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage
readline.c
0.0%
0.0 % 0 / 185 0.0 % 0 / 17
gplib.c
53.5%53.5%
53.5 % 473 / 884 63.8 % 60 / 94
es.c
59.9%59.9%
59.9 % 1566 / 2615 64.3 % 196 / 305
default.c
61.9%61.9%
61.9 % 346 / 559 61.2 % 41 / 67
init.c
70.7%70.7%
70.7 % 882 / 1247 76.2 % 112 / 147
eval.c
74.4%74.4%
74.4 % 1113 / 1495 84.5 % 109 / 129
parse.c
76.9%76.9%
76.9 % 276 / 359 100.0 % 5 / 5
forprime.c
85.5%85.5%
85.5 % 406 / 475 87.2 % 34 / 39
hash.c
87.4%87.4%
87.4 % 152 / 174 96.7 % 29 / 30
anal.c
89.5%89.5%
89.5 % 573 / 640 90.8 % 89 / 98
compile.c
90.2%90.2%
90.2 % 1385 / 1536 97.6 % 82 / 84
parse.y
93.8%93.8%
93.8 % 106 / 113 - 0 / 0
sumiter.c
96.9%96.9%
96.9 % 1127 / 1163 99.0 % 98 / 99
parsec.h
97.1%97.1%
97.1 % 100 / 103 100.0 % 17 / 17
intnum.c
97.6%97.6%
97.6 % 1451 / 1487 99.2 % 121 / 122
members.c
98.7%98.7%
98.7 % 307 / 311 100.0 % 54 / 54
str.c
100.0%
100.0 % 108 / 108 100.0 % 14 / 14

Generated by: LCOV version 1.13