aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/test_datastore_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datastore/test_datastore_api.c')
-rw-r--r--src/datastore/test_datastore_api.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c
index 66ba416af..a88dd0c20 100644
--- a/src/datastore/test_datastore_api.c
+++ b/src/datastore/test_datastore_api.c
@@ -94,7 +94,7 @@ get_expiration (int i)
94{ 94{
95 struct GNUNET_TIME_Absolute av; 95 struct GNUNET_TIME_Absolute av;
96 96
97 av.abs_value = now.abs_value + 20000000 - i * 1000; 97 av.abs_value_us = now.abs_value_us + 20000000000LL - i * 1000 * 1000LL;
98 return av; 98 return av;
99} 99}
100 100
@@ -191,20 +191,21 @@ check_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
191 return; 191 return;
192 } 192 }
193#if 0 193#if 0
194 FPRINTF (stderr, "Check value got `%s' of size %u, type %d, expire %llu\n", 194 FPRINTF (stderr,
195 "Check value got `%s' of size %u, type %d, expire %s\n",
195 GNUNET_h2s (key), (unsigned int) size, type, 196 GNUNET_h2s (key), (unsigned int) size, type,
196 (unsigned long long) expiration.abs_value); 197 GNUNET_STRINGS_absolute_time_to_string (expiration));
197 FPRINTF (stderr, 198 FPRINTF (stderr,
198 "Check value iteration %d wants size %u, type %d, expire %llu\n", i, 199 "Check value iteration %d wants size %u, type %d, expire %s\n", i,
199 (unsigned int) get_size (i), get_type (i), 200 (unsigned int) get_size (i), get_type (i),
200 (unsigned long long) get_expiration (i).abs_value); 201 GNUNET_STRINGS_absolute_time_to_string (get_expiration(i)));
201#endif 202#endif
202 GNUNET_assert (size == get_size (i)); 203 GNUNET_assert (size == get_size (i));
203 GNUNET_assert (0 == memcmp (data, get_data (i), size)); 204 GNUNET_assert (0 == memcmp (data, get_data (i), size));
204 GNUNET_assert (type == get_type (i)); 205 GNUNET_assert (type == get_type (i));
205 GNUNET_assert (priority == get_priority (i)); 206 GNUNET_assert (priority == get_priority (i));
206 GNUNET_assert (anonymity == get_anonymity (i)); 207 GNUNET_assert (anonymity == get_anonymity (i));
207 GNUNET_assert (expiration.abs_value == get_expiration (i).abs_value); 208 GNUNET_assert (expiration.abs_value_us == get_expiration (i).abs_value_us);
208 crc->offset++; 209 crc->offset++;
209 if (crc->i == 0) 210 if (crc->i == 0)
210 { 211 {