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 Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 17420-b2ea0e2) Lines: 95094 107167 88.7 %
Date: 2015-02-01 Functions: 8494 9371 90.6 %
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 % Branches: 55723 74488 74.8 %

Directory Sort by name Line Coverage Sort by line coverage Functions Sort by function coverage Branches Sort by branch coverage
basemath
91.7%91.7%
91.7 % 67977 / 74133 93.8 % 5770 / 6150 78.1 % 40062 / 51317
gp
30.3%30.3%
30.3 % 278 / 916 26.2 % 22 / 84 18.1 % 116 / 641
graph
62.8%62.8%
62.8 % 904 / 1439 73.6 % 81 / 110 46.9 % 376 / 802
headers
89.3%89.3%
89.3 % 1179 / 1320 88.1 % 489 / 555 83.3 % 523 / 628
kernel/gmp
90.9%90.9%
90.9 % 748 / 823 98.3 % 57 / 58 81.6 % 525 / 643
kernel/none
91.9%91.9%
91.9 % 3171 / 3449 84.5 % 355 / 420 75.0 % 2679 / 3574
language
73.4%73.4%
73.4 % 8306 / 11323 79.4 % 889 / 1120 57.4 % 4525 / 7879
modules
91.0%91.0%
91.0 % 12334 / 13548 95.6 % 801 / 838 76.8 % 6854 / 8922
mt
91.2%91.2%
91.2 % 197 / 216 83.3 % 30 / 36 76.8 % 63 / 82

Generated by: LCOV version 1.9