aboutsummaryrefslogtreecommitdiff
path: root/src/dns
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-06-25 20:05:25 +0200
committerChristian Grothoff <christian@grothoff.org>2018-06-25 20:05:25 +0200
commitf895f6c37937c17a73fa2b13211d2d52b94c79e5 (patch)
tree83bc5237fd6bedbd929a189b15884b57436db161 /src/dns
parent2d22da9b531933db65f80ce12b11dd917a387eeb (diff)
downloadgnunet-f895f6c37937c17a73fa2b13211d2d52b94c79e5.tar.gz
gnunet-f895f6c37937c17a73fa2b13211d2d52b94c79e5.zip
move hexcode, eliminate redundant test
Diffstat (limited to 'src/dns')
-rw-r--r--src/dns/test_hexcoder.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/dns/test_hexcoder.c b/src/dns/test_hexcoder.c
deleted file mode 100644
index 441d7e200..000000000
--- a/src/dns/test_hexcoder.c
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2014 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
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 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18*/
19/**
20 * @author Christian Grothoff
21 * @file dns/test_hexcoder.c
22 * @brief test for #GNUNET_DNSPARSER_hex_to_bin() and
23 * #GNUNET_DNSPARSER_bin_to_hex()
24 */
25#include "platform.h"
26#include "gnunet_util_lib.h"
27#include "gnunet_dnsparser_lib.h"
28
29#define TESTSTRING "Hello World!"
30
31
32int
33main (int argc,
34 char *argv[])
35{
36 char buf[strlen (TESTSTRING) + 1];
37 char *ret;
38
39 GNUNET_log_setup ("test-hexcoder", "WARNING", NULL);
40 ret = GNUNET_DNSPARSER_bin_to_hex (TESTSTRING,
41 strlen (TESTSTRING) + 1);
42 GNUNET_assert (NULL != ret);
43 GNUNET_assert (sizeof (buf) ==
44 GNUNET_DNSPARSER_hex_to_bin (ret,
45 buf));
46 GNUNET_assert (0 == memcmp (TESTSTRING,
47 buf,
48 sizeof (buf)));
49 GNUNET_free (ret);
50 return 0;
51}
52
53
54/* end of test_hexcoder.c */