From: Nathan S. Evans Date: Fri, 2 Jul 2010 16:01:09 +0000 (+0000) Subject: failing datacache testcase X-Git-Tag: initial-import-from-subversion-38251~21049 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4864cd9ec24e9c45c64b7e3624eb3c65ac8f171f;p=oweals%2Fgnunet.git failing datacache testcase --- diff --git a/src/datacache/test_datacache.c b/src/datacache/test_datacache.c index d323d955a..1b2aee42f 100644 --- a/src/datacache/test_datacache.c +++ b/src/datacache/test_datacache.c @@ -97,6 +97,19 @@ run (void *cls, &checkIt, &n)); k = n; } + + memset(&k, 42, sizeof(GNUNET_HashCode)); + GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); + ASSERT (GNUNET_OK == GNUNET_DATACACHE_put (h, + &k, + sizeof (GNUNET_HashCode), + (const char *) &n, + 792, + GNUNET_TIME_absolute_get_forever())); + ASSERT (1 == + GNUNET_DATACACHE_get (h, &k, 792, + &checkIt, &n)); + GNUNET_DATACACHE_destroy (h); ASSERT (ok == 0); return;