From e8ec8b8885a37b2ab46b7a82ec852f68f739aa7e Mon Sep 17 00:00:00 2001 From: leiiyb Date: Wed, 8 Jan 2025 22:31:50 +0800 Subject: [PATCH] fix code Signed-off-by: leiiyb --- .../mock_abs_result_set.cpp | 4 ++-- .../notification_rdb_data_mgr_test.cpp | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/services/ans/test/unittest/notification_rdb_data_mgr_test/mock_abs_result_set.cpp b/services/ans/test/unittest/notification_rdb_data_mgr_test/mock_abs_result_set.cpp index 2a32123c0..238243b48 100755 --- a/services/ans/test/unittest/notification_rdb_data_mgr_test/mock_abs_result_set.cpp +++ b/services/ans/test/unittest/notification_rdb_data_mgr_test/mock_abs_result_set.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "abs_result_set.h" +#include "result_set.h" #include "rdb_errno.h" namespace { @@ -27,7 +27,7 @@ void MockGoToFirstRow(bool mockRet) namespace OHOS { namespace NativeRdb { -int AbsResultSet::GoToFirstRow() +int ResultSet::GoToFirstRow() { if (g_mockGoToFirstRowRet == false) { return E_ERROR; diff --git a/services/ans/test/unittest/notification_rdb_data_mgr_test/notification_rdb_data_mgr_test.cpp b/services/ans/test/unittest/notification_rdb_data_mgr_test/notification_rdb_data_mgr_test.cpp index f1aa458be..92cc024cb 100755 --- a/services/ans/test/unittest/notification_rdb_data_mgr_test/notification_rdb_data_mgr_test.cpp +++ b/services/ans/test/unittest/notification_rdb_data_mgr_test/notification_rdb_data_mgr_test.cpp @@ -24,6 +24,7 @@ #undef private #undef protected #include "rdb_store.h" +#include "result_set.h" #include "value_object.h" namespace { @@ -102,7 +103,7 @@ class RdbStoreTest : public RdbStore { { return NativeRdb::E_ERROR; }; - virtual std::shared_ptr Query(int &errCode, bool distinct, const std::string &table, + virtual std::shared_ptr Query(int &errCode, bool distinct, const std::string &table, const std::vector &columns, const std::string &whereClause = "", const std::vector &bindArgs = {}, const std::string &groupBy = "", const std::string &indexName = "", const std::string &orderBy = "", @@ -111,12 +112,12 @@ class RdbStoreTest : public RdbStore { { return nullptr; }; - virtual std::shared_ptr QuerySql( + virtual std::shared_ptr QuerySql( const std::string &sql, const std::vector &selectionArgs) { return nullptr; }; - virtual std::shared_ptr QuerySql( + virtual std::shared_ptr QuerySql( const std::string &sql, const std::vector &selectionArgs = {}) { return nullptr; @@ -173,13 +174,12 @@ class RdbStoreTest : public RdbStore { { return NativeRdb::E_ERROR; }; - virtual std::shared_ptr Query( + virtual std::shared_ptr Query( const AbsRdbPredicates &predicates, const std::vector &columns) { if (g_mockQueryRet == false) { - std::string name = "aa"; - std::shared_ptr resultSet = - std::make_unique(name); + std::shared_ptr resultSet = + std::make_unique(); return resultSet; } return nullptr; -- Gitee