1 /*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "retention_file_manager_test.h"
17 #include <cerrno>
18 #include <gtest/gtest.h>
19 #include <securec.h>
20 #include "dlp_permission.h"
21 #include "dlp_permission_log.h"
22
23 using namespace testing::ext;
24 using namespace OHOS;
25 using namespace OHOS::Security::DlpPermission;
26 using namespace std;
27
28 namespace {
29 static constexpr OHOS::HiviewDFX::HiLogLabel LABEL = {
30 LOG_CORE, SECURITY_DOMAIN_DLP_PERMISSION, "RetentionFileManagerTest"};
31 }
32
SetUpTestCase()33 void RetentionFileManagerTest::SetUpTestCase() {}
34
TearDownTestCase()35 void RetentionFileManagerTest::TearDownTestCase() {}
36
SetUp()37 void RetentionFileManagerTest::SetUp() {}
38
TearDown()39 void RetentionFileManagerTest::TearDown() {}
40
41 /**
42 * @tc.name: UpdateReadFlag001
43 * @tc.desc: UpdateReadFlag test
44 * @tc.type: FUNC
45 * @tc.require:
46 */
47 HWTEST_F(RetentionFileManagerTest, UpdateReadFlag001, TestSize.Level1)
48 {
49 DLP_LOG_INFO(LABEL, "UpdateReadFlag001");
50
51 uint32_t tokenId = 0;
52 ASSERT_EQ(DLP_OK, RetentionFileManager::GetInstance().UpdateReadFlag(tokenId));
53 }