2 This file is part of GNUnet.
3 (C) 2010 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
21 * @file monkey/test_monkey_edb.c
22 * @brief testcase for edb_api.c
25 #include "gnunet_common.h"
26 #include "gnunet_monkey_edb.h"
29 static const char *ref[16] =
30 { "args", "32", "argv", "32", "whole", "42", "whole.member", "42",
31 "whole.member=1", "42", "whole.part", "43", "&part", "43",
32 "whole.part=&part", "43"
35 static int refCount = 0;
39 expressionIterator (void *cls, int colNum, char **colValues, char **colNames)
42 for (i = 0; i < colNum; i++)
44 if (strcmp (colValues[i], ref[refCount]) != 0)
54 main (int args, const char *argv[])
56 struct GNUNET_MONKEY_EDB_Context *cntxt;
57 cntxt = GNUNET_MONKEY_EDB_connect ("test.db");
59 GNUNET_MONKEY_EDB_get_expressions (cntxt,
60 "monkey/seaspider/SeaspiderTest.c", 44,
61 83, &expressionIterator, NULL);
62 GNUNET_MONKEY_EDB_disconnect (cntxt);