summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/test/sql_pt_representation_test.cc
diff options
context:
space:
mode:
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.cc12
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");