• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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 
17 #include <stdio.h>
18 #include "gtest/gtest.h"
19 
20 #include "devattest_interface.h"
21 
22 #define ATTEST_SOFTWARE_RESULT_SIZE 5
23 #define ACTS_DEVATTEST_SUCCESS 0
24 
25 using namespace std;
26 using namespace testing::ext;
27 
28 class DeviceAttestStartTest : public testing::Test {
29 protected:
SetUpTestCase(void)30     static void SetUpTestCase(void) {}
TearDownTestCase(void)31     static void TearDownTestCase(void) {}
SetUp()32     virtual void SetUp() {}
TearDown()33     virtual void TearDown() {
34         sleep(4);
35     }
36 };
37 
38 /**
39  * @tc.number    : Sub_Device_Attest_Test_0100
40  * @tc.name      : HiLog::Info parameter legal test (Cortex-A, C)
41  * @tc.desc      : [C- SOFTWARE -0200]
42  */
43 HWTEST_F(DeviceAttestStartTest, subDeviceAttestTest0100, Function | MediumTest | Level1)
44 {
45     int32_t ret = ACTS_DEVATTEST_SUCCESS;
46     ret = StartDevAttestTask();
47     printf("[CLIENT MAIN] StartDevAttestTask ret:%d.\n", ret);
48     EXPECT_EQ(ret, ACTS_DEVATTEST_SUCCESS);
49 }
50