diff options
Diffstat (limited to 'src/components/application_manager/test/app_launch')
3 files changed, 18 insertions, 18 deletions
diff --git a/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc b/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc index 1b90f29647..3293a8908d 100644 --- a/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc +++ b/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc @@ -40,7 +40,7 @@ #include "application_manager/mock_application.h" #include "application_manager/mock_application_manager.h" #include "connection_handler/mock_connection_handler.h" -#include "utils/make_shared.h" + #include "utils/test_async_waiter.h" namespace test { @@ -60,12 +60,12 @@ namespace ch_test = test::components::connection_handler_test; namespace am_test = test::components::application_manager_test; const uint32_t MAX_TEST_DURATION = 1000; // 1 second -typedef utils::SharedPtr<am_test::MockApplication> MockAppPtr; +typedef std::shared_ptr<am_test::MockApplication> MockAppPtr; class AppLaunchCtrlTest : public ::testing::Test { public: MockAppPtr AppFromAppData(const app_launch::ApplicationData& app_data) { - utils::SharedPtr<NiceMock<am_test::MockApplication> > app = - utils::MakeShared<NiceMock<am_test::MockApplication> >(); + std::shared_ptr<NiceMock<am_test::MockApplication> > app = + std::make_shared<NiceMock<am_test::MockApplication> >(); ON_CALL(*app, mac_address()).WillByDefault(ReturnRef(app_data.device_mac_)); ON_CALL(*app, bundle_id()).WillByDefault(ReturnRef(app_data.bundle_id_)); @@ -77,7 +77,7 @@ class AppLaunchCtrlTest : public ::testing::Test { app_launch::ApplicationDataPtr AppDataFromApp( const am_test::MockApplication& app) { app_launch::ApplicationDataPtr app_data = - utils::MakeShared<NiceMock<app_launch::ApplicationData> >( + std::make_shared<NiceMock<app_launch::ApplicationData> >( app.policy_app_id(), app.bundle_id(), app.mac_address()); return app_data; } @@ -137,7 +137,7 @@ class AppLaunchCtrlTest : public ::testing::Test { using app_launch::ApplicationData; AppAndAppData app; app.second = - utils::MakeShared<ApplicationData>(app_id, bundle_id, device_mac); + std::make_shared<ApplicationData>(app_id, bundle_id, device_mac); app.first = AppFromAppData(*app.second); return app; } @@ -164,7 +164,7 @@ class AppLaunchCtrlTest : public ::testing::Test { NiceMock<ch_test::MockConnectionHandler> connection_handler_mock_; NiceMock<resumprion_test::MockResumeCtrl> resume_ctrl_mock_; NiceMock<app_launch_test::MockAppLaunchSettings> settings_; - std::auto_ptr<app_launch::AppLaunchCtrlImpl> app_launch_ctrl_; + std::unique_ptr<app_launch::AppLaunchCtrlImpl> app_launch_ctrl_; }; app_launch::ApplicationData AppDataFromApp( diff --git a/src/components/application_manager/test/app_launch/app_launch_data_db_test.cc b/src/components/application_manager/test/app_launch/app_launch_data_db_test.cc index e095f0682e..dc96fcf176 100644 --- a/src/components/application_manager/test/app_launch/app_launch_data_db_test.cc +++ b/src/components/application_manager/test/app_launch/app_launch_data_db_test.cc @@ -38,7 +38,7 @@ #include "utils/macro.h" #include "sql_database.h" #include "sql_query.h" -#include "utils/make_shared.h" + #include "utils/file_system.h" #include "application_manager/mock_app_launch_settings.h" #include "application_manager/app_launch/app_launch_data_db.h" @@ -113,7 +113,7 @@ class AppLaunchDataDBTest : public ::testing::Test { return test_db_; } - static std::auto_ptr<AppLaunchDataDB> res_db_; + static std::unique_ptr<AppLaunchDataDB> res_db_; AppLaunchDataDB* res_db() { return res_db_.get(); @@ -145,7 +145,7 @@ class AppLaunchDataDBTest : public ::testing::Test { }; utils::dbms::SQLDatabase* AppLaunchDataDBTest::test_db_ = NULL; -std::auto_ptr<AppLaunchDataDB> AppLaunchDataDBTest::res_db_; +std::unique_ptr<AppLaunchDataDB> AppLaunchDataDBTest::res_db_; void AppLaunchDataDBTest::AddApplicationDataWithIncreaseTable( const ApplicationData& data) { @@ -284,7 +284,7 @@ TEST_F(AppLaunchDataDBTest, SelectMultipleData) { const std::string mobile_app_id = AddCounter("d1_mobile_app_id", i); const std::string bundle_id = AddCounter("d1_bundle_id", i); - ApplicationDataPtr app_data = utils::MakeShared<ApplicationData>( + ApplicationDataPtr app_data = std::make_shared<ApplicationData>( mobile_app_id, bundle_id, device_mac_1); AddApplicationDataWithIncreaseTable(*app_data); input_data1.push_back(app_data); @@ -294,7 +294,7 @@ TEST_F(AppLaunchDataDBTest, SelectMultipleData) { const std::string mobile_app_id = AddCounter("d2_mobile_app_id", i); const std::string bundle_id = AddCounter("d2_bundle_id", i); - ApplicationDataPtr app_data = utils::MakeShared<ApplicationData>( + ApplicationDataPtr app_data = std::make_shared<ApplicationData>( mobile_app_id, bundle_id, device_mac_2); AddApplicationDataWithIncreaseTable(*app_data); input_data2.push_back(app_data); diff --git a/src/components/application_manager/test/app_launch/app_launch_data_json_test.cc b/src/components/application_manager/test/app_launch/app_launch_data_json_test.cc index cc7d3f5814..f68ad32bbb 100644 --- a/src/components/application_manager/test/app_launch/app_launch_data_json_test.cc +++ b/src/components/application_manager/test/app_launch/app_launch_data_json_test.cc @@ -36,7 +36,7 @@ #include "json/json.h" #include "gtest/gtest.h" #include "utils/macro.h" -#include "utils/make_shared.h" + #include "utils/file_system.h" #include "utils/date_time.h" #include "resumption/last_state_impl.h" @@ -67,7 +67,7 @@ class AppLaunchDataJsonTest : public ::testing::Test { private: virtual void SetUp() { ::file_system::DeleteFile(kAppStorageFile); - test_last_state_ = std::auto_ptr<resumption::LastState>( + test_last_state_ = std::unique_ptr<resumption::LastState>( new resumption::LastStateImpl(kAppStorageFolder, kAppInfoStorage)); ASSERT_TRUE(::file_system::CreateFile(kAppStorageFile)); @@ -102,8 +102,8 @@ class AppLaunchDataJsonTest : public ::testing::Test { void GetApplicationData_EXPECT_FALSE(const ApplicationData& in_data); std::string AddCounter(const std::string& inp, int32_t val); - std::auto_ptr<resumption::LastState> test_last_state_; - std::auto_ptr<AppLaunchDataJson> res_json_; + std::unique_ptr<resumption::LastState> test_last_state_; + std::unique_ptr<AppLaunchDataJson> res_json_; void SetTimestamp(const ApplicationData& in_data, TimevalStruct& timestamp); }; @@ -301,7 +301,7 @@ TEST_F(AppLaunchDataJsonTest, SelectMultipleData) { const std::string mobile_app_id = AddCounter("d1_mobile_app_id_", i); const std::string bundle_id = AddCounter("d1_bundle_id_", i); - ApplicationDataPtr app_data = utils::MakeShared<ApplicationData>( + ApplicationDataPtr app_data = std::make_shared<ApplicationData>( mobile_app_id, bundle_id, device_mac_1); AddApplicationDataWithIncreaseTable(*app_data); input_data1.push_back(app_data); @@ -311,7 +311,7 @@ TEST_F(AppLaunchDataJsonTest, SelectMultipleData) { const std::string mobile_app_id = AddCounter("d2_mobile_app_id_", i); const std::string bundle_id = AddCounter("d2_bundle_id_", i); - ApplicationDataPtr app_data = utils::MakeShared<ApplicationData>( + ApplicationDataPtr app_data = std::make_shared<ApplicationData>( mobile_app_id, bundle_id, device_mac_2); AddApplicationDataWithIncreaseTable(*app_data); input_data2.push_back(app_data); |