Skip to content

Commit 302acbd

Browse files
committed
fix tests
1 parent d4b4a60 commit 302acbd

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

tests/protocol/src/bin.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "data.h"
1414
#include "test_utils.h"
1515

16-
static struct thingset_context ts;
16+
static struct thingset_global_context ts;
1717

1818
ZTEST(thingset_bin, test_get_root_ids)
1919
{
@@ -910,17 +910,19 @@ ZTEST(thingset_bin, test_export_subsets_progressively)
910910
int data_exp_len = hex2bin_spaced(data_exp_hex, data_exp, sizeof(data_exp));
911911

912912
index = 0;
913+
thingset_context req_ctx;
913914
ret = thingset_export_subsets_progressively(&ts, buf_large, sizeof(buf_large), SUBSET_LIVE,
914-
THINGSET_BIN_IDS_VALUES, &index, &len);
915+
THINGSET_BIN_IDS_VALUES, &req_ctx, &index, &len);
915916
zassert_true(ret >= 0);
916917
zassert_equal(len, data_exp_len);
917918
zassert_mem_equal(data_exp, buf_large, data_exp_len);
918919

919920
index = 0;
920921
size_t pos = 0;
921922
do {
922-
ret = thingset_export_subsets_progressively(&ts, buf_small, sizeof(buf_small), SUBSET_LIVE,
923-
THINGSET_BIN_IDS_VALUES, &index, &len);
923+
ret =
924+
thingset_export_subsets_progressively(&ts, buf_small, sizeof(buf_small), SUBSET_LIVE,
925+
THINGSET_BIN_IDS_VALUES, &req_ctx, &index, &len);
924926
zassert_true(ret >= 0);
925927
zassert_mem_equal(data_exp + pos, buf_small, len);
926928
pos += len;

tests/protocol/src/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ extern size_t data_objects_size;
1313

1414
ZTEST(thingset_init, test_init_data_objects)
1515
{
16-
struct thingset_context ts_local;
17-
struct thingset_context ts_global;
16+
struct thingset_global_context ts_local;
17+
struct thingset_global_context ts_global;
1818

1919
/* initialized with array declared in data.c */
2020
thingset_init(&ts_local, data_objects, data_objects_size);

tests/protocol/src/txt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "data.h"
1414
#include "test_utils.h"
1515

16-
static struct thingset_context ts;
16+
static struct thingset_global_context ts;
1717

1818
bool update_callback_called;
1919

0 commit comments

Comments
 (0)