X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=blobdiff_plain;f=tests%2Flibpspp%2Fsparse-xarray-test.c;h=dd5a2a99307d2dee4c60cf524c9d8c63ac73d14e;hp=798b84267c77f00648b39fc853f6fab668cade29;hb=719e78ffb991ee5683d131cbcff7406ac625e1e7;hpb=388fb23b17cd58ec28964cca517fcd79dea92197
diff --git a/tests/libpspp/sparse-xarray-test.c b/tests/libpspp/sparse-xarray-test.c
index 798b8426..dd5a2a99 100644
--- a/tests/libpspp/sparse-xarray-test.c
+++ b/tests/libpspp/sparse-xarray-test.c
@@ -15,17 +15,12 @@
along with this program. If not, see . */
/* This is a test program for the sparse array routines defined
- in sparse-xarray.c. This test program aims to be as
- comprehensive as possible. "gcov -b" should report 100%
- coverage of lines and branches in sparse-xarray.c when
- compiled with -DNDEBUG. "valgrind --leak-check=yes
- --show-reachable=yes" should give a clean report. */
+ in sparse-xarray.c. */
#ifdef HAVE_CONFIG_H
#include
#endif
-#include
#include
#include
#include
@@ -40,7 +35,6 @@
#include
#include
-#include "error.h"
#include "minmax.h"
#include "progname.h"
#include "xalloc.h"
@@ -495,10 +489,11 @@ enum
OPT_NO_WRITE_ROWS,
OPT_NO_WRITE_COLUMNS,
OPT_NO_COPY_COLUMNS,
- OPT_HELP
+ OPT_HELP,
+ N_SPARSE_XARRAY_OPTIONS
};
-static struct argv_option sparse_xarray_argv_options[] =
+static struct argv_option sparse_xarray_argv_options[N_SPARSE_XARRAY_OPTIONS] =
{
{"columns", 0, required_argument, OPT_COLUMNS},
{"max-rows", 0, required_argument, OPT_MAX_ROWS},
@@ -511,8 +506,6 @@ static struct argv_option sparse_xarray_argv_options[] =
{"no-copy-columns", 0, no_argument, OPT_NO_COPY_COLUMNS},
{"help", 'h', no_argument, OPT_HELP},
};
-enum { N_SPARSE_XARRAY_ARGV_OPTIONS = (sizeof sparse_xarray_argv_options
- / sizeof *sparse_xarray_argv_options) };
static void
sparse_xarray_option_callback (int id, void *params_)
@@ -600,7 +593,7 @@ main (int argc, char *argv[])
options = mc_options_create ();
mc_options_register_argv_parser (options, parser);
argv_parser_add_options (parser, sparse_xarray_argv_options,
- N_SPARSE_XARRAY_ARGV_OPTIONS,
+ N_SPARSE_XARRAY_OPTIONS,
sparse_xarray_option_callback, ¶ms);
if (!argv_parser_run (parser, argc, argv))
exit (EXIT_FAILURE);