From 1d61c32fee7a1f3d7a8377f4f1cbb7d7853e380a Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Tue, 6 Mar 2018 20:40:59 +0000 Subject: [PATCH] tests/test_uri.c: Update to use uri_path instead of key for resource hash. --- tests/test_uri.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test_uri.c b/tests/test_uri.c index 2dfa58f0..1740b2b1 100644 --- a/tests/test_uri.c +++ b/tests/test_uri.c @@ -338,12 +338,11 @@ t_parse_uri13(void) { .used_size = sizeof(teststr) }; - coap_key_t key; + str *uri_path = coap_get_uri_path(&pdu); - coap_hash_request_uri(&pdu, key); - - CU_ASSERT(sizeof(key) == sizeof(COAP_DEFAULT_WKC_HASHKEY) - 1); - CU_ASSERT_NSTRING_EQUAL(key, COAP_DEFAULT_WKC_HASHKEY, sizeof(key)); + CU_ASSERT(uri_path->length == sizeof(COAP_DEFAULT_URI_WELLKNOWN)-1); + CU_ASSERT_NSTRING_EQUAL(uri_path->s, COAP_DEFAULT_URI_WELLKNOWN, + sizeof(COAP_DEFAULT_URI_WELLKNOWN)-1); } static void