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

Generated by: LCOV version 1.16