修改codecheck

Signed-off-by: ljy <liujiaying7@huawei.com>
This commit is contained in:
ljy 2024-02-06 18:26:11 +08:00
parent 1597b0845e
commit dc61f1baff
4 changed files with 15 additions and 16 deletions

View File

@ -15,8 +15,6 @@ distributedfilejs_path = "//foundation/distributeddatamgr/distributedfile"
kv_store_path = "//foundation/distributeddatamgr/kv_store"
kv_store_native_path = "${kv_store_base_path}/frameworks/native"
relational_store_path = "//foundation/distributeddatamgr/relational_store"
relational_store_inner_api_path =

View File

@ -127,10 +127,10 @@ ohos_unittest("UtilsTest") {
ohos_unittest("StoreTest") {
module_out_path = module_output_path
sources = [
"store_test.cpp",
"../../service/rdb/rdb_query.cpp",
]
sources = [
"store_test.cpp",
"../../service/rdb/rdb_query.cpp",
]
configs = [ ":module_private_config" ]
@ -150,7 +150,8 @@ ohos_unittest("StoreTest") {
"${data_service_path}/service:distributeddatasvc",
"//third_party/googletest:gtest_main",
]
}
ohos_unittest("AssetLoaderTest") {
module_out_path = module_output_path
sources = [ "asset_loader_test.cpp" ]

View File

@ -52,7 +52,7 @@ HWTEST_F(GeneralValueTest, SetQueryNodesTest, TestSize.Level2)
QueryNode node;
node.op = OHOS::DistributedData::QueryOperation::EQUAL_TO;
node.fieldName = "test_fieldName";
node.fieldValue = {"aaa","bbb","ccc"};
node.fieldValue = {"aaa", "bbb", "ccc"};
QueryNodes nodes{
{node}
};

View File

@ -43,8 +43,8 @@ public:
{
return static_cast<uint64_t>(std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
}
int interval_time = 100 * 1000;
int test_val = 10;
int intervalTime = 100 * 1000;
int testNum = 10;
};
class RefCountTest : public testing::Test {
@ -86,10 +86,10 @@ HWTEST_F(UtilsTest, StoreMetaDataConvertToStoreInfo, TestSize.Level2)
HWTEST_F(BlockIntegerTest, SymbolOverloadingTest, TestSize.Level2)
{
ZLOGI("BlockIntegerTest SymbolOverloading begin.");
int interval = interval_time;
int interval = intervalTime;
BlockInteger blockInteger(interval);
blockInteger = test_val;
ASSERT_EQ(blockInteger, test_val);
blockInteger = testNum;
ASSERT_EQ(blockInteger, testNum);
auto now1 = GetCurrentTime();
int val = blockInteger++;
@ -118,7 +118,7 @@ HWTEST_F(RefCountTest, Constructortest, TestSize.Level2)
{
int num = 0;
{
RefCount refCount([&num](){
RefCount refCount([&num]() {
num += 10;
});
ASSERT_TRUE(refCount);
@ -134,7 +134,7 @@ HWTEST_F(RefCountTest, Constructortest, TestSize.Level2)
RefCount refCount4 = std::move(refCount2);
ASSERT_TRUE(refCount4);
ASSERT_EQ(num,0);
ASSERT_EQ(num, 0);
}
ASSERT_EQ(num,10);
ASSERT_EQ(num, 10);
}