From c45ae773e16f3ba6b2c23fed6c6acb5a8fb2821b Mon Sep 17 00:00:00 2001 From: Shobhit Adlakha Date: Sat, 16 Mar 2019 18:39:34 -0500 Subject: Set expectation that shared_ptr for command was succesfully created in dummy_command_tests --- .../test/commands/hmi/dummy_hmi_commands_test.cc | 2 +- .../test/commands/mobile/dummy_mobile_commands_test.cc | 2 +- .../test/commands/hmi/dummy_hmi_commands_test.cc | 10 +++++----- .../test/commands/mobile/dummy_mobile_commands_test.cc | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc index e182397516..8ef87b6de9 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc @@ -141,7 +141,7 @@ TYPED_TEST_CASE(HMICommandsTestFirst, HMICommandsListFirst); TYPED_TEST(HMICommandsTestFirst, CtorAndDtorCall) { std::shared_ptr command = this->template CreateCommand(); - UNUSED(command); + EXPECT_NE(command.use_count(), 0); } } // namespace dummy_hmi_commands_test diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc index 2f8fd1eb6c..3c8a780128 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc @@ -125,7 +125,7 @@ TYPED_TEST_CASE(MobileCommandsTestFirst, MobileCommandsListFirst); TYPED_TEST(MobileCommandsTestFirst, CtorAndDtorCall) { std::shared_ptr command = this->template CreateCommand(); - UNUSED(command); + EXPECT_NE(command.use_count(), 0); } } // namespace dummy_mobile_commands_test diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc index 5327ce3e33..874d27b4b0 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc @@ -511,30 +511,30 @@ TYPED_TEST_CASE(HMICommandsTestFifth, HMICommandsListFifth); TYPED_TEST(HMICommandsTestFirst, CtorAndDtorCall) { std::shared_ptr command = this->template CreateCommand(); - UNUSED(command); + EXPECT_NE(command.use_count(), 0); } TYPED_TEST(HMICommandsTestSecond, CtorAndDtorCall) { std::shared_ptr command = this->template CreateCommand(); - UNUSED(command); + EXPECT_NE(command.use_count(), 0); } TYPED_TEST(HMICommandsTestThird, CtorAndDtorCall) { std::shared_ptr command = this->template CreateCommand(); - UNUSED(command); + EXPECT_NE(command.use_count(), 0); } TYPED_TEST(HMICommandsTestFourth, CtorAndDtorCall) { std::shared_ptr command = this->template CreateCommand(); - UNUSED(command); + EXPECT_NE(command.use_count(), 0); } TYPED_TEST(HMICommandsTestFifth, CtorAndDtorCall) { std::shared_ptr command = this->template CreateCommand(); - UNUSED(command); + EXPECT_NE(command.use_count(), 0); } } // namespace dummy_hmi_commands_test diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc index cb9ae4ddf4..9c20143c39 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dummy_mobile_commands_test.cc @@ -300,18 +300,18 @@ TYPED_TEST_CASE(MobileCommandsTestThird, MobileCommandsListThird); TYPED_TEST(MobileCommandsTestFirst, CtorAndDtorCall) { std::shared_ptr command = this->template CreateCommand(); - UNUSED(command); + EXPECT_NE(command.use_count(), 0); } TYPED_TEST(MobileCommandsTestSecond, CtorAndDtorCall) { std::shared_ptr command = this->template CreateCommand(); - UNUSED(command); + EXPECT_NE(command.use_count(), 0); } TYPED_TEST(MobileCommandsTestThird, CtorAndDtorCall) { std::shared_ptr command = this->template CreateCommand(); - UNUSED(command); + EXPECT_NE(command.use_count(), 0); } } // namespace dummy_mobile_commands_test -- cgit v1.2.1