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.1 lcov report (development 30702-bddb8d6928) Lines: 899 1423 63.2 %
Date: 2026-02-23 02:23:56 Functions: 93 131 71.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Draw 0
_ploth 0
_psdraw 0
_psdraw_scale 0
chk_8bit 0
clipline 0
cp 0
cpd 0
gendraw 0
get_xy 0
hex2 0
param_recursion 0
pari_plot_by_file 0
parploth 0
plotarc 0
plotclip 0
plotcolor 0
plotcopy 0
plotdraw 0
ploth 0
ploth0 0
plothraw 0
plothsizes 0
plotpointsize 0
plotrecthraw 0
ps_arc 0
ps_fillarc 0
ps_fillrect 0
psdraw 0
psploth 0
psploth0 0
psplothraw 0
rectarc0 0
rectsplines 0
spline_eval 0
svg_ell 0
svg_fillell 0
svg_fillrect 0
plotrecth 5
plotrecth0 5
parplothexport 10
gtodblList 11
plotbox 11
plothraw_i 11
plothrawexport 11
plotline 11
plotpoint 11
plotpointtype 11
plotrbox 11
plotrecthraw_i 11
plotrline 11
plotrmove 11
plotrpoint 11
plotscale 11
ps_points 18
svg_points 20
dblV_from_RgV 22
plotlines 22
plotpoint0 22
plotpoints 22
plotpoints0 22
ps_lines 24
plotcursor 30
plothexport 32
plothexport0 32
plotinit 33
pari_get_psplot 41
rect2ps 41
rect2ps_i 41
_plothexport 42
plotexport 43
wxy_init 43
wxy_n 43
plotrecth_i 47
plotrecthin 47
ps_rect 47
svg_lines 50
pari_get_fmtplot 53
pari_get_svgplot 55
rect2svg 55
svg_head 55
svg_tail 55
_box 58
plotrecthrawin 58
rectlines0 58
svg_rect 65
initrect_get_arg 66
plotscale0 69
plotmove 72
rectbox0 80
_line 84
ps_string 84
fmt_convert 96
gen_draw 96
rectline0 106
set_range 116
initrect_i 139
plotkill 139
svg_text 150
plotlinetype 200
rectticks 232
plotstring 234
color_to_rgb 339
colormap_to_color 339
colorname_to_rgb 339
rgb_to_long 339
_move 354
plotmove0 437
svg_point 674
ps_point 737
pari_init_graphics 1491
pari_kill_plot_engine 1491
pari_set_plot_engine 1491
check_rect_init 1703
check_rect 1842
ps_line 2370
ps_sc 2561
svg_line 3385
svg_color 3750
rmiddle 6435
long_to_rgb 6650
Rchain 6937
freeobj 6937
single_recursion 8905
get_xy_from_vec 23600
Appendx 28075
set_xrange 29175
Appendy 44075
set_yrange 45175
svg_rescale 90548
DTOL 116235

Generated by: LCOV version 1.16