123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- /*
- This file is part of GNUnet.
- (C) 2004, 2005, 2006, 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 3, 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 fs/test_fs_start_stop.c
- * @brief testcase for fs.c (start-stop only)
- * @author Christian Grothoff
- */
- #include "platform.h"
- #include "gnunet_util_lib.h"
- #include "gnunet_testing_lib.h"
- #include "gnunet_fs_service.h"
- static void *
- progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
- {
- return NULL;
- }
- static void
- run (void *cls,
- const struct GNUNET_CONFIGURATION_Handle *cfg,
- struct GNUNET_TESTING_Peer *peer)
- {
- struct GNUNET_FS_Handle *fs;
- fs = GNUNET_FS_start (cfg, "test-fs-start-stop", &progress_cb, NULL,
- GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END);
- GNUNET_assert (NULL != fs);
- GNUNET_FS_stop (fs);
- }
- int
- main (int argc, char *argv[])
- {
- if (0 != GNUNET_TESTING_peer_run ("test-fs-start-stop",
- "test_fs_data.conf",
- &run, NULL))
- return 1;
- return 0;
- }
- /* end of test_fs_start_stop.c */
|