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 - graph - plotport.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29806-4d001396c7) Lines: 1215 1425 85.3 %
Date: 2024-12-21 09:08:57 Functions: 111 131 84.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Appendx 176441
Appendy 241441
DTOL 173749
Draw 76
Rchain 36422
_box 137
_line 228
_move 821
_ploth 44
_plothexport 60
_psdraw 0
_psdraw_scale 0
check_rect 25026
check_rect_init 24704
chk_8bit 0
clipline 120
color_to_rgb 11216
colormap_to_color 11212
colorname_to_rgb 11216
cp 460
cpd 0
dblV_from_RgV 504
fmt_convert 142
freeobj 36742
gen_draw 142
gendraw 44
get_xy 138192
get_xy_from_vec 40256
gtodblList 42
hex2 0
initrect_get_arg 180
initrect_i 314
long_to_rgb 20267
param_recursion 138104
pari_get_fmtplot 78
pari_get_psplot 49
pari_get_svgplot 93
pari_init_graphics 1872
pari_kill_plot_engine 1862
pari_plot_by_file 0
pari_set_plot_engine 1862
parploth 0
parplothexport 14
plotarc 0
plotbox 18
plotclip 20
plotcolor 8
plotcopy 36
plotcursor 47
plotdraw 44
plotexport 64
ploth 44
ploth0 44
plothexport 46
plothexport0 46
plothraw 8
plothraw_i 26
plothrawexport 18
plothsizes 8
plotinit 90
plotkill 310
plotline 18
plotlines 36
plotlinetype 10890
plotmove 119
plotmove0 958
plotpoint 18
plotpoint0 36
plotpoints 36
plotpoints0 36
plotpointsize 0
plotpointtype 18
plotrbox 18
plotrecth 9983
plotrecth0 7
plotrecth_i 10087
plotrecthin 10087
plotrecthraw 16
plotrecthraw_i 42
plotrecthrawin 10113
plotrline 18
plotrmove 18
plotrpoint 18
plotscale 34
plotscale0 171
plotstring 492
ps_arc 0
ps_fillarc 0
ps_fillrect 0
ps_line 2765
ps_lines 28
ps_point 860
ps_points 21
ps_rect 56
ps_sc 2989
ps_string 98
psdraw 0
psploth 0
psploth0 0
psplothraw 0
rect2ps 49
rect2ps_i 49
rect2svg 93
rectarc0 0
rectbox0 173
rectline0 264
rectlines0 10525
rectsplines 8
rectticks 548
rgb_to_long 11216
rmiddle 217949
set_range 20226
set_xrange 185061
set_yrange 251653
single_recursion 103871
spline_eval 234176
svg_color 6062
svg_ell 0
svg_fillell 0
svg_fillrect 0
svg_head 93
svg_line 5451
svg_lines 82
svg_point 992
svg_points 32
svg_rect 111
svg_rescale 141920
svg_tail 93
svg_text 250
wxy_init 108
wxy_n 108

Generated by: LCOV version 1.16