diff options
author | Nils Gillmann <ng0@n0.is> | 2018-06-13 08:05:15 +0000 |
---|---|---|
committer | Nils Gillmann <ng0@n0.is> | 2018-06-13 08:05:15 +0000 |
commit | 5c7f4f919d2569f49e4223d77000452dd2ec4e97 (patch) | |
tree | 8cec76a5dda6b034d1e5b85eee76a43fafd8a4a5 /src/namestore/test_namestore_api_store_update.c | |
parent | 1f7a2dd68d1e6260fad4af042878c0a07d39bc12 (diff) | |
parent | 8503c6fa26449228fa691c1dedfe3ca1a8d0b9ba (diff) | |
download | gnunet-5c7f4f919d2569f49e4223d77000452dd2ec4e97.tar.gz gnunet-5c7f4f919d2569f49e4223d77000452dd2ec4e97.zip |
Merge branch 'master' of gnunet.org:gnunet
Signed-off-by: Nils Gillmann <ng0@n0.is>
Diffstat (limited to 'src/namestore/test_namestore_api_store_update.c')
-rw-r--r-- | src/namestore/test_namestore_api_store_update.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/namestore/test_namestore_api_store_update.c b/src/namestore/test_namestore_api_store_update.c index 7b13cd9c5..bd62fdd4c 100644 --- a/src/namestore/test_namestore_api_store_update.c +++ b/src/namestore/test_namestore_api_store_update.c | |||
@@ -2,20 +2,18 @@ | |||
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2012, 2013, 2018 GNUnet e.V. | 3 | Copyright (C) 2012, 2013, 2018 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | it under the terms of the GNU General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
7 | by the Free Software Foundation; either version 3, or (at your | 7 | by the Free Software Foundation, either version 3 of the License, |
8 | option) any later version. | 8 | or (at your option) any later version. |
9 | 9 | ||
10 | GNUnet is distributed in the hope that it will be useful, but | 10 | GNUnet is distributed in the hope that it will be useful, but |
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with GNUnet; see the file COPYING. If not, write to the | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
18 | Boston, MA 02110-1301, USA. | ||
19 | */ | 17 | */ |
20 | /** | 18 | /** |
21 | * @file namestore/test_namestore_api_store_update.c | 19 | * @file namestore/test_namestore_api_store_update.c |
@@ -27,15 +25,14 @@ | |||
27 | #include "gnunet_namecache_service.h" | 25 | #include "gnunet_namecache_service.h" |
28 | #include "gnunet_namestore_service.h" | 26 | #include "gnunet_namestore_service.h" |
29 | #include "gnunet_testing_lib.h" | 27 | #include "gnunet_testing_lib.h" |
28 | #include "gnunet_dnsparser_lib.h" | ||
30 | 29 | ||
31 | #define TEST_RECORD_TYPE 1234 | 30 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT |
32 | 31 | ||
33 | #define TEST_RECORD_DATALEN 123 | 32 | #define TEST_RECORD_DATALEN 123 |
34 | 33 | ||
35 | #define TEST_RECORD_DATA 'a' | 34 | #define TEST_RECORD_DATA 'a' |
36 | 35 | ||
37 | #define TEST_RECORD_TYPE2 4321 | ||
38 | |||
39 | #define TEST_RECORD_DATALEN2 234 | 36 | #define TEST_RECORD_DATALEN2 234 |
40 | 37 | ||
41 | #define TEST_RECORD_DATA2 'b' | 38 | #define TEST_RECORD_DATA2 'b' |
@@ -149,7 +146,7 @@ rd_decrypt_cb (void *cls, | |||
149 | 146 | ||
150 | rd_new.flags = GNUNET_GNSRECORD_RF_NONE; | 147 | rd_new.flags = GNUNET_GNSRECORD_RF_NONE; |
151 | rd_new.expiration_time = GNUNET_TIME_absolute_get().abs_value_us + 1000000000; | 148 | rd_new.expiration_time = GNUNET_TIME_absolute_get().abs_value_us + 1000000000; |
152 | rd_new.record_type = TEST_RECORD_TYPE2; | 149 | rd_new.record_type = TEST_RECORD_TYPE; |
153 | rd_new.data_size = TEST_RECORD_DATALEN2; | 150 | rd_new.data_size = TEST_RECORD_DATALEN2; |
154 | rd_new.data = GNUNET_malloc (TEST_RECORD_DATALEN2); | 151 | rd_new.data = GNUNET_malloc (TEST_RECORD_DATALEN2); |
155 | memset ((char *) rd_new.data, | 152 | memset ((char *) rd_new.data, |
@@ -172,7 +169,7 @@ rd_decrypt_cb (void *cls, | |||
172 | memset (rd_cmp_data, | 169 | memset (rd_cmp_data, |
173 | TEST_RECORD_DATA2, | 170 | TEST_RECORD_DATA2, |
174 | TEST_RECORD_DATALEN2); | 171 | TEST_RECORD_DATALEN2); |
175 | GNUNET_assert (TEST_RECORD_TYPE2 == rd[0].record_type); | 172 | GNUNET_assert (TEST_RECORD_TYPE == rd[0].record_type); |
176 | GNUNET_assert (TEST_RECORD_DATALEN2 == rd[0].data_size); | 173 | GNUNET_assert (TEST_RECORD_DATALEN2 == rd[0].data_size); |
177 | GNUNET_assert (0 == memcmp (&rd_cmp_data, | 174 | GNUNET_assert (0 == memcmp (&rd_cmp_data, |
178 | rd[0].data, | 175 | rd[0].data, |