diff options
author | JackLivio <jack@livio.io> | 2018-10-19 15:05:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-19 15:05:09 -0400 |
commit | d36316738785c96dab2ee892762ed08c059fffde (patch) | |
tree | 168a7c0705b5bc8f0dee7ce4b511ccf71759d9b4 /src/components/policy/policy_external/test/sql_pt_representation_test.cc | |
parent | 7f7fcbb998fb17f2954fd103349af67ea9b71a3f (diff) | |
parent | 83c5e805346d55ec7fb9f4ba8b6f6855d992273e (diff) | |
download | sdl_core-d36316738785c96dab2ee892762ed08c059fffde.tar.gz |
Merge pull request #2572 from smartdevicelink/release/5.0.05.0.0hotfix/templates_updatesfeature/show_app_menufeature/progress_bar_seekfeature/open-menu-rpcfeature/open-menu-rfeature/button
Release 5.0.0
Diffstat (limited to 'src/components/policy/policy_external/test/sql_pt_representation_test.cc')
-rw-r--r-- | src/components/policy/policy_external/test/sql_pt_representation_test.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/policy/policy_external/test/sql_pt_representation_test.cc b/src/components/policy/policy_external/test/sql_pt_representation_test.cc index a657a01145..b0f340b0f2 100644 --- a/src/components/policy/policy_external/test/sql_pt_representation_test.cc +++ b/src/components/policy/policy_external/test/sql_pt_representation_test.cc @@ -49,7 +49,6 @@ #include "policy/policy_table/enums.h" #include "rpc_base/rpc_base.h" #include "policy/mock_policy_settings.h" -#include "utils/shared_ptr.h" namespace policy_table = rpc::policy_table_interface_base; using policy::SQLPTRepresentation; @@ -81,14 +80,14 @@ class SQLPTRepresentationTest : public SQLPTRepresentation, static const std::string kDatabaseName; static utils::dbms::SQLQuery* query_wrapper_; // Gtest can show message that this object doesn't destroyed - static std::auto_ptr<policy_handler_test::MockPolicySettings> + static std::unique_ptr<policy_handler_test::MockPolicySettings> policy_settings_; static void SetUpTestCase() { const std::string kAppStorageFolder = "storage_SQLPTRepresentationTest"; reps = new SQLPTRepresentation(in_memory_); ASSERT_TRUE(reps != NULL); - policy_settings_ = std::auto_ptr<policy_handler_test::MockPolicySettings>( + policy_settings_ = std::unique_ptr<policy_handler_test::MockPolicySettings>( new policy_handler_test::MockPolicySettings()); ON_CALL(*policy_settings_, app_storage_folder()) .WillByDefault(ReturnRef(kAppStorageFolder)); @@ -348,7 +347,7 @@ SQLPTRepresentation* SQLPTRepresentationTest::reps = 0; utils::dbms::SQLQuery* SQLPTRepresentationTest::query_wrapper_ = 0; const std::string SQLPTRepresentationTest::kDatabaseName = ":memory:"; const bool SQLPTRepresentationTest::in_memory_ = true; -std::auto_ptr<policy_handler_test::MockPolicySettings> +std::unique_ptr<policy_handler_test::MockPolicySettings> SQLPTRepresentationTest::policy_settings_; class SQLPTRepresentationTest2 : public ::testing::Test { @@ -407,7 +406,8 @@ TEST_F(SQLPTRepresentationTest, query.Prepare(query_select); query.Next(); - const int policy_tables_number = 32; + // 33 - is current total tables number created by schema + const int policy_tables_number = 33; ASSERT_EQ(policy_tables_number, query.GetInteger(0)); const std::string query_select_count_of_iap_buffer_full = @@ -1584,7 +1584,7 @@ TEST_F(SQLPTRepresentationTest, ASSERT_TRUE(reps->Save(update)); // Act - utils::SharedPtr<policy_table::Table> snapshot = reps->GenerateSnapshot(); + std::shared_ptr<policy_table::Table> snapshot = reps->GenerateSnapshot(); snapshot->SetPolicyTableType(rpc::policy_table_interface_base::PT_SNAPSHOT); // Remove fields which must be absent in snapshot table["policy_table"]["consumer_friendly_messages"].removeMember("messages"); |