Welcome! Log In Create A New Profile

Advanced

[njs] The lvlhsh unit test has been updated after nxt_str_t chan...

August 04, 2016 09:34AM
details: http://hg.nginx.org/njs/rev/19175c06b532
branches:
changeset: 142:19175c06b532
user: Igor Sysoev <igor@sysoev.ru>
date: Thu Aug 04 16:31:48 2016 +0300
description:
The lvlhsh unit test has been updated after nxt_str_t changes.

diffstat:

nxt/test/lvlhsh_unit_test.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)

diffs (53 lines):

diff -r b33ba39a1108 -r 19175c06b532 nxt/test/lvlhsh_unit_test.c
--- a/nxt/test/lvlhsh_unit_test.c Thu Aug 04 16:27:38 2016 +0300
+++ b/nxt/test/lvlhsh_unit_test.c Thu Aug 04 16:31:48 2016 +0300
@@ -6,6 +6,7 @@

#include <nxt_types.h>
#include <nxt_clang.h>
+#include <nxt_string.h>
#include <nxt_stub.h>
#include <nxt_malloc.h>
#include <nxt_lvlhsh.h>
@@ -19,7 +20,7 @@
static nxt_int_t
lvlhsh_unit_test_key_test(nxt_lvlhsh_query_t *lhq, void *data)
{
- if (*(uintptr_t *) lhq->key.data == (uintptr_t) data) {
+ if (*(uintptr_t *) lhq->key.start == (uintptr_t) data) {
return NXT_OK;
}

@@ -58,8 +59,8 @@ lvlhsh_unit_test_add(nxt_lvlhsh_t *lh, c

lhq.key_hash = key;
lhq.replace = 0;
- lhq.key.len = sizeof(uintptr_t);
- lhq.key.data = (u_char *) &key;
+ lhq.key.length = sizeof(uintptr_t);
+ lhq.key.start = (u_char *) &key;
lhq.value = (void *) key;
lhq.proto = proto;
lhq.pool = pool;
@@ -86,8 +87,8 @@ lvlhsh_unit_test_get(nxt_lvlhsh_t *lh, c
nxt_lvlhsh_query_t lhq;

lhq.key_hash = key;
- lhq.key.len = sizeof(uintptr_t);
- lhq.key.data = (u_char *) &key;
+ lhq.key.length = sizeof(uintptr_t);
+ lhq.key.start = (u_char *) &key;
lhq.proto = proto;

if (nxt_lvlhsh_find(lh, &lhq) == NXT_OK) {
@@ -112,8 +113,8 @@ lvlhsh_unit_test_delete(nxt_lvlhsh_t *lh
nxt_lvlhsh_query_t lhq;

lhq.key_hash = key;
- lhq.key.len = sizeof(uintptr_t);
- lhq.key.data = (u_char *) &key;
+ lhq.key.length = sizeof(uintptr_t);
+ lhq.key.start = (u_char *) &key;
lhq.proto = proto;
lhq.pool = pool;


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] The lvlhsh unit test has been updated after nxt_str_t chan...

Igor Sysoev 828 August 04, 2016 09:34AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 220
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready