From b112d32f73e5fa9361af6ac2ff119220302f3e62 Mon Sep 17 00:00:00 2001 From: Ji Lu Date: Thu, 15 Oct 2009 09:14:37 +0000 Subject: [PATCH] bio testcase harness~ --- src/util/Makefile.am | 8 ++++++++ src/util/test_bio.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 src/util/test_bio.c diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 32d1299d0..9c9802847 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -88,6 +88,7 @@ libgnunet_plugin_test_la_LDFLAGS = \ check_PROGRAMS = \ + test_bio \ test_client \ test_common_allocation \ test_common_endian \ @@ -132,6 +133,13 @@ check_PROGRAMS = \ TESTS = $(check_PROGRAMS) + +test_bio_SOURCES = \ + test_bio.c +test_bio_LDADD = \ + $(top_builddir)/src/util/libgnunetutil.la + + test_client_SOURCES = \ test_client.c test_client_LDADD = \ diff --git a/src/util/test_bio.c b/src/util/test_bio.c new file mode 100644 index 000000000..c4c838675 --- /dev/null +++ b/src/util/test_bio.c @@ -0,0 +1,45 @@ +/* + This file is part of GNUnet. + (C) 2009 Christian Grothoff (and other contributing authors) + + GNUnet is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 2, or (at your + option) any later version. + + GNUnet is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNUnet; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +/** + * @file util/test_bio.c + * @brief testcase for the buffered IO module + * @author + */ +#include "platform.h" +#include "gnunet_common.h" +#include "gnunet_disk_lib.h" +#include "gnunet_scheduler_lib.h" + + + +int +main (int argc, char *argv[]) +{ + unsigned int failureCount = 0; + + GNUNET_log_setup ("test-bio", "WARNING", NULL); + if (failureCount != 0) + { + fprintf (stderr, "\n%u TESTS FAILED!\n", failureCount); + return -1; + } + return 0; +} /* end of main */ -- 2.25.1