Fix Svace issue : #446783 79/243079/2
authorJihoon Jung <jh8801.jung@samsung.com>
Thu, 3 Sep 2020 04:45:00 +0000 (13:45 +0900)
committerYu <jiung.yu@samsung.com>
Thu, 3 Sep 2020 05:20:25 +0000 (14:20 +0900)
Change-Id: If7b2e4585829339be337c6240c97cd72471197af
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
tests/mocks/mock_plugin_dwm1001.c
tests/uwb-manager-gtest.cpp

index e195f9d..707b991 100644 (file)
@@ -229,7 +229,7 @@ static GSList *__get_anchor_list_anchor()
                        continue;
 
                node->is_remote = true;
-               node->node_id = MOCK_PLUGIN_DWM1001_NODEID + i;
+               node->node_id = (uint64_t)(MOCK_PLUGIN_DWM1001_NODEID + i);
                node->pan_id = dwm1001_ctx.pan_id;
                node->x = MOCK_PLUGIN_DWM1001_POS_X + 1;
                node->y = MOCK_PLUGIN_DWM1001_POS_Y + 1;
@@ -257,7 +257,7 @@ static GSList *__get_anchor_list_tag()
                /*TODO: Should update valid position and distance */
                node->distance = 10;
                node->is_remote = true;
-               node->node_id = MOCK_PLUGIN_DWM1001_NODEID + i;
+               node->node_id = (uint64_t)(MOCK_PLUGIN_DWM1001_NODEID + i);
                node->pan_id = dwm1001_ctx.pan_id;
                node->x = test_node_x[i];
                node->y = test_node_y[i];
index 2b5e1c7..77e4c33 100644 (file)
@@ -351,9 +351,10 @@ TEST_F(UwbRangePluginTest, uwb_range_plugin_set_position_Positive)
 
        uwb_hpi_node_s *own_node = nullptr;
        ret = _range_plugin->getOwnNode(&own_node);
+       ASSERT_TRUE(own_node != nullptr);
 
        ret = _range_plugin->setPosition(own_node->node_id, 0, 0, 0);
-       ASSERT_EQ(0, ret);
+       EXPECT_EQ(0, ret);
 
        if (own_node)
                free(own_node);