Skip to content

Commit 33f4173

Browse files
committed
fix tests
1 parent d4b4a60 commit 33f4173

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

tests/cpp/src/init.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
ZTEST(thingset_init_cpp, test_init_data_objects)
1717
{
18-
struct thingset_context ts_local;
19-
struct thingset_context ts_global;
18+
struct thingset_global_context ts_local;
19+
struct thingset_global_context ts_global;
2020

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

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+
struct 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/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include "test_utils.h"
1414

15-
static struct thingset_context ts;
15+
static struct thingset_global_context ts;
1616

1717
ZTEST(thingset_common, test_endpoint_from_path)
1818
{

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

tests/report/src/report.c

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

1414
#ifdef CONFIG_THINGSET_REPORT_RECORD_SERIALIZATION
15-
static struct thingset_context ts;
15+
static struct thingset_global_context ts;
1616

1717
ZTEST(thingset_report, test_report_bin)
1818
{

tests/serde/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "test_utils.h"
1313

14-
static struct thingset_context ts;
14+
static struct thingset_global_context ts;
1515

1616
static void patch_json_get_cbor(const char *name, const char *json_value,
1717
const char *cbor_value_hex)

0 commit comments

Comments
 (0)