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 - graph - plotps.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 17110-9967e23) Lines: 0 25 0.0 %
Date: 2014-11-26 Functions: 0 2 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 8 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* Copyright (C) 2000  The PARI group.
       2                 :            : 
       3                 :            : This file is part of the PARI/GP package.
       4                 :            : 
       5                 :            : PARI/GP is free software; you can redistribute it and/or modify it under the
       6                 :            : terms of the GNU General Public License as published by the Free Software
       7                 :            : Foundation. It is distributed in the hope that it will be useful, but WITHOUT
       8                 :            : ANY WARRANTY WHATSOEVER.
       9                 :            : 
      10                 :            : Check the License for details. You should have received a copy of it, along
      11                 :            : with the package; see the file 'COPYING'. If not, write to the Free Software
      12                 :            : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
      13                 :            : 
      14                 :            : /*******************************************************************/
      15                 :            : /*           HIGH RESOLUTION PLOT VIA POSTSCRIPT FILE              */
      16                 :            : /*******************************************************************/
      17                 :            : 
      18                 :            : #include "pari.h"
      19                 :            : #include "paripriv.h"
      20                 :            : #include "rect.h"
      21                 :            : 
      22                 :            : void
      23                 :          0 : rectdraw0(long *w, long *x, long *y, long lw)
      24                 :            : {
      25                 :            :   struct plot_eng plot;
      26                 :            :   FILE *file;
      27                 :            :   char *s, *cmd;
      28                 :            :   const char *v;
      29         [ #  # ]:          0 :   if (pari_daemon()) return;  /* parent process returns */
      30                 :          0 :   s = pari_unique_filename("plotps");
      31                 :          0 :   pari_unlink(s);
      32                 :          0 :   s = stack_strcat(s, ".ps");
      33                 :          0 :   file = fopen(s, "w");
      34         [ #  # ]:          0 :   if (!file) pari_err_FILE("postscript file", s);
      35                 :          0 :   psplot_init(&plot, file, 1.0, 1.0, 9);
      36                 :          0 :   fprintf(file,"0 %ld translate -90 rotate\n", plot.pl->height - 50);
      37                 :          0 :   gen_rectdraw0(&plot, w, x, y, lw, 1, 1);
      38                 :          0 :   fprintf(file,"stroke showpage\n"); (void)fclose(file);
      39                 :          0 :   v = os_getenv("GP_POSTSCRIPT_VIEWER");
      40         [ #  # ]:          0 :   if (!v) v = "open -W";
      41                 :          0 :   cmd = pari_sprintf("%s \"%s\" 2>/dev/null", v, s);
      42                 :          0 :   gpsystem(cmd);
      43                 :          0 :   pari_unlink(s); exit(0);
      44                 :            : }
      45                 :            : 
      46                 :            : void
      47                 :          0 : PARI_get_plot()
      48                 :            : {
      49         [ #  # ]:          0 :   if (pari_plot.init) return;
      50                 :          0 :   pari_plot.width  = 400;
      51                 :          0 :   pari_plot.height = 300;
      52                 :          0 :   pari_plot.fheight = 9;
      53                 :          0 :   pari_plot.fwidth  = 6;
      54                 :          0 :   pari_plot.hunit   = 3;
      55                 :          0 :   pari_plot.vunit   = 3;
      56                 :          0 :   pari_plot.init = 1;
      57                 :            : }

Generated by: LCOV version 1.9