Skip to content

Commit

Permalink
merge_bridging : fix unittest issues
Browse files Browse the repository at this point in the history
  • Loading branch information
joochlee authored and Daniel Adam committed Jan 26, 2024
1 parent b0a7f43 commit 630b2de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/oc_core_res.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@ oc_core_add_new_device_at_index(oc_add_new_device_t cfg, size_t index)

if (index > device_count) {
OC_ERR(
"designated device index is bigger than current number of all Devices");
"designated device index (%d) is bigger than current number of all Devices",
g_device_count);
return NULL;
} else if (index < device_count) {
/*
Expand Down
5 changes: 5 additions & 0 deletions api/unittest/coreresourcetest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,12 @@ TEST_F(TestCoreResource, CoreDevice_P)
ASSERT_NE(addcoredevice, nullptr);
size_t numcoredevice = oc_core_get_num_devices();
EXPECT_EQ(1, numcoredevice);

#ifdef OC_HAS_FEATURE_BRIDGE
oc_core_remove_device_at_index(numcoredevice-1);
#else
oc_connectivity_shutdown(kDevice1ID);
#endif
}

static void
Expand Down

0 comments on commit 630b2de

Please sign in to comment.