merge enum cases

Signed-off-by: wangchao582 <wangchao582@huawei.com>
This commit is contained in:
wangchao582 2024-01-10 16:09:16 +08:00
parent 59aa133cf3
commit 69601b18d5
3 changed files with 23 additions and 257 deletions

View File

@ -885,7 +885,7 @@ HWTEST_F(UserIamFaceAuthTestAdditional, testFaceAuthTestCancel004, Function | Me
/**
* @tc.number SUB_Security_Iam_FaceAuth_HDI_SendCommand_0200
* @tc.name testFaceAuthTestSendCommand001
* @tc.desc test SendCommand commandId LOCK_TEMPLATE
* @tc.desc test SendCommand commandId enum
*/
HWTEST_F(UserIamFaceAuthTestAdditional, testFaceAuthTestSendCommand001, Function | MediumTest | Level1)
{
@ -898,38 +898,12 @@ HWTEST_F(UserIamFaceAuthTestAdditional, testFaceAuthTestSendCommand001, Function
int32_t ret = g_executorImpl.SendCommand(commandId, extraInfo, callbackObj);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_FaceAuth_HDI_SendCommand_0300
* @tc.name testFaceAuthTestSendCommand002
* @tc.desc test SendCommand commandId UNLOCK_TEMPLATE
*/
HWTEST_F(UserIamFaceAuthTestAdditional, testFaceAuthTestSendCommand002, Function | MediumTest | Level1)
{
cout << "start test testFaceAuthTestSendCommand002" << endl;
int32_t commandId = UNLOCK_TEMPLATE;
std::vector<uint8_t> extraInfo;
FillTestUint8Vector(parcel, extraInfo);
sptr<IExecutorCallback> callbackObj;
FillTestIExecutorCallback(parcel, callbackObj);
int32_t ret = g_executorImpl.SendCommand(commandId, extraInfo, callbackObj);
commandId = UNLOCK_TEMPLATE;
ret = g_executorImpl.SendCommand(commandId, extraInfo, callbackObj);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_FaceAuth_HDI_SendCommand_0400
* @tc.name testFaceAuthTestSendCommand003
* @tc.desc test SendCommand commandId VENDOR_COMMAND_BEGIN
*/
HWTEST_F(UserIamFaceAuthTestAdditional, testFaceAuthTestSendCommand003, Function | MediumTest | Level1)
{
cout << "start test testFaceAuthTestSendCommand003" << endl;
int32_t commandId = VENDOR_COMMAND_BEGIN;
std::vector<uint8_t> extraInfo;
FillTestUint8Vector(parcel, extraInfo);
sptr<IExecutorCallback> callbackObj;
FillTestIExecutorCallback(parcel, callbackObj);
int32_t ret = g_executorImpl.SendCommand(commandId, extraInfo, callbackObj);
commandId = VENDOR_COMMAND_BEGIN;
ret = g_executorImpl.SendCommand(commandId, extraInfo, callbackObj);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
@ -1107,7 +1081,7 @@ HWTEST_F(UserIamFaceAuthTestAdditional, testFaceAuthTestSetBufferProducer002, Fu
/**
* @tc.number SUB_Security_Iam_FaceAuth_HDI_GetProperty_0200
* @tc.name testFaceAuthTestGetProperty001
* @tc.desc test GetProperty ptype AUTH_SUB_TYPE
* @tc.desc test GetProperty ptype enum
*/
HWTEST_F(UserIamFaceAuthTestAdditional, testFaceAuthTestGetProperty001, Function | MediumTest | Level1)
{
@ -1115,84 +1089,11 @@ HWTEST_F(UserIamFaceAuthTestAdditional, testFaceAuthTestGetProperty001, Function
std::vector<uint64_t> templateIdList;
FillTestUint64Vector(parcel, templateIdList);
std::vector<GetPropertyType> propertyTypes;
GetPropertyType ptype = OHOS::HDI::FaceAuth::V1_1::AUTH_SUB_TYPE;
propertyTypes.push_back(ptype);
Property property;
FillTestProperty(parcel, property);
int32_t ret = g_executorImpl.GetProperty(templateIdList, propertyTypes, property);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_FaceAuth_HDI_GetProperty_0300
* @tc.name testFaceAuthTestGetProperty002
* @tc.desc test GetProperty ptype LOCKOUT_DURATION
*/
HWTEST_F(UserIamFaceAuthTestAdditional, testFaceAuthTestGetProperty002, Function | MediumTest | Level1)
{
cout << "start test testFaceAuthTestGetProperty002" << endl;
std::vector<uint64_t> templateIdList;
FillTestUint64Vector(parcel, templateIdList);
std::vector<GetPropertyType> propertyTypes;
GetPropertyType ptype = OHOS::HDI::FaceAuth::V1_1::LOCKOUT_DURATION;
propertyTypes.push_back(ptype);
Property property;
FillTestProperty(parcel, property);
int32_t ret = g_executorImpl.GetProperty(templateIdList, propertyTypes, property);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_FaceAuth_HDI_GetProperty_0400
* @tc.name testFaceAuthTestGetProperty003
* @tc.desc test GetProperty ptype REMAIN_ATTEMPTS
*/
HWTEST_F(UserIamFaceAuthTestAdditional, testFaceAuthTestGetProperty003, Function | MediumTest | Level1)
{
cout << "start test testFaceAuthTestGetProperty003" << endl;
std::vector<uint64_t> templateIdList;
FillTestUint64Vector(parcel, templateIdList);
std::vector<GetPropertyType> propertyTypes;
GetPropertyType ptype = OHOS::HDI::FaceAuth::V1_1::REMAIN_ATTEMPTS;
propertyTypes.push_back(ptype);
Property property;
FillTestProperty(parcel, property);
int32_t ret = g_executorImpl.GetProperty(templateIdList, propertyTypes, property);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_FaceAuth_HDI_GetProperty_0500
* @tc.name testFaceAuthTestGetProperty004
* @tc.desc test GetProperty ptype ENROLL_PROGRESS
*/
HWTEST_F(UserIamFaceAuthTestAdditional, testFaceAuthTestGetProperty004, Function | MediumTest | Level1)
{
cout << "start test testFaceAuthTestGetProperty004" << endl;
std::vector<uint64_t> templateIdList;
FillTestUint64Vector(parcel, templateIdList);
std::vector<GetPropertyType> propertyTypes;
GetPropertyType ptype = OHOS::HDI::FaceAuth::V1_1::ENROLL_PROGRESS;
propertyTypes.push_back(ptype);
Property property;
FillTestProperty(parcel, property);
int32_t ret = g_executorImpl.GetProperty(templateIdList, propertyTypes, property);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_FaceAuth_HDI_GetProperty_0600
* @tc.name testFaceAuthTestGetProperty005
* @tc.desc test GetProperty ptype SENSOR_INFO
*/
HWTEST_F(UserIamFaceAuthTestAdditional, testFaceAuthTestGetProperty005, Function | MediumTest | Level1)
{
cout << "start test testFaceAuthTestGetProperty005" << endl;
std::vector<uint64_t> templateIdList;
FillTestUint64Vector(parcel, templateIdList);
std::vector<GetPropertyType> propertyTypes;
GetPropertyType ptype = OHOS::HDI::FaceAuth::V1_1::SENSOR_INFO;
propertyTypes.push_back(ptype);
propertyTypes.push_back(OHOS::HDI::FaceAuth::V1_1::AUTH_SUB_TYPE);
propertyTypes.push_back(OHOS::HDI::FaceAuth::V1_1::LOCKOUT_DURATION);
propertyTypes.push_back(OHOS::HDI::FaceAuth::V1_1::REMAIN_ATTEMPTS);
propertyTypes.push_back(OHOS::HDI::FaceAuth::V1_1::ENROLL_PROGRESS);
propertyTypes.push_back(OHOS::HDI::FaceAuth::V1_1::SENSOR_INFO);
Property property;
FillTestProperty(parcel, property);
int32_t ret = g_executorImpl.GetProperty(templateIdList, propertyTypes, property);

View File

@ -897,7 +897,7 @@ HWTEST_F(UserIamFingerprintAuthTestAdditional, testFingerprintAuthTestCancel004,
/**
* @tc.number SUB_Security_Iam_FingerprintAuth_HDI_SendCommand_0200
* @tc.name testFingerprintAuthTestSendCommand001
* @tc.desc test SendCommand commandId LOCK_TEMPLATE
* @tc.desc test SendCommand commandId enum
*/
HWTEST_F(UserIamFingerprintAuthTestAdditional, testFingerprintAuthTestSendCommand001, Function | MediumTest | Level1)
{
@ -910,38 +910,12 @@ HWTEST_F(UserIamFingerprintAuthTestAdditional, testFingerprintAuthTestSendComman
int32_t ret = g_executorImpl.SendCommand(commandId, extraInfo, callbackObj);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_FingerprintAuth_HDI_SendCommand_0300
* @tc.name testFingerprintAuthTestSendCommand002
* @tc.desc test SendCommand commandId UNLOCK_TEMPLATE
*/
HWTEST_F(UserIamFingerprintAuthTestAdditional, testFingerprintAuthTestSendCommand002, Function | MediumTest | Level1)
{
cout << "start test testFingerprintAuthTestSendCommand002" << endl;
int32_t commandId = UNLOCK_TEMPLATE;
std::vector<uint8_t> extraInfo;
FillTestUint8Vector(parcel, extraInfo);
sptr<IExecutorCallback> callbackObj;
FillTestIExecutorCallback(parcel, callbackObj);
int32_t ret = g_executorImpl.SendCommand(commandId, extraInfo, callbackObj);
commandId = UNLOCK_TEMPLATE;
ret = g_executorImpl.SendCommand(commandId, extraInfo, callbackObj);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_FingerprintAuth_HDI_SendCommand_0400
* @tc.name testFingerprintAuthTestSendCommand003
* @tc.desc test SendCommand commandId VENDOR_COMMAND_BEGIN
*/
HWTEST_F(UserIamFingerprintAuthTestAdditional, testFingerprintAuthTestSendCommand003, Function | MediumTest | Level1)
{
cout << "start test testFingerprintAuthTestSendCommand003" << endl;
int32_t commandId = VENDOR_COMMAND_BEGIN;
std::vector<uint8_t> extraInfo;
FillTestUint8Vector(parcel, extraInfo);
sptr<IExecutorCallback> callbackObj;
FillTestIExecutorCallback(parcel, callbackObj);
int32_t ret = g_executorImpl.SendCommand(commandId, extraInfo, callbackObj);
commandId = VENDOR_COMMAND_BEGIN;
ret = g_executorImpl.SendCommand(commandId, extraInfo, callbackObj);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
@ -1328,7 +1302,7 @@ HWTEST_F(UserIamFingerprintAuthTestAdditional, testFingerprintAuthTestAuthentica
/**
* @tc.number SUB_Security_Iam_FingerprintAuth_HDI_GetProperty_0200
* @tc.name testFingerprintAuthTestGetProperty001
* @tc.desc test GetProperty ptype AUTH_SUB_TYPE
* @tc.desc test GetProperty ptype enum
*/
HWTEST_F(UserIamFingerprintAuthTestAdditional, testFingerprintAuthTestGetProperty001, Function | MediumTest | Level1)
{
@ -1336,84 +1310,11 @@ HWTEST_F(UserIamFingerprintAuthTestAdditional, testFingerprintAuthTestGetPropert
std::vector<uint64_t> templateIdList;
FillTestUint64Vector(parcel, templateIdList);
std::vector<GetPropertyType> propertyTypes;
GetPropertyType ptype = OHOS::HDI::FingerprintAuth::V1_1::AUTH_SUB_TYPE;
propertyTypes.push_back(ptype);
Property property;
FillTestProperty(parcel, property);
int32_t ret = g_executorImpl.GetProperty(templateIdList, propertyTypes, property);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_FingerprintAuth_HDI_GetProperty_0300
* @tc.name testFingerprintAuthTestGetProperty002
* @tc.desc test GetProperty ptype LOCKOUT_DURATION
*/
HWTEST_F(UserIamFingerprintAuthTestAdditional, testFingerprintAuthTestGetProperty002, Function | MediumTest | Level1)
{
cout << "start test testFingerprintAuthTestGetProperty002" << endl;
std::vector<uint64_t> templateIdList;
FillTestUint64Vector(parcel, templateIdList);
std::vector<GetPropertyType> propertyTypes;
GetPropertyType ptype = OHOS::HDI::FingerprintAuth::V1_1::LOCKOUT_DURATION;
propertyTypes.push_back(ptype);
Property property;
FillTestProperty(parcel, property);
int32_t ret = g_executorImpl.GetProperty(templateIdList, propertyTypes, property);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_FingerprintAuth_HDI_GetProperty_0400
* @tc.name testFingerprintAuthTestGetProperty003
* @tc.desc test GetProperty ptype REMAIN_ATTEMPTS
*/
HWTEST_F(UserIamFingerprintAuthTestAdditional, testFingerprintAuthTestGetProperty003, Function | MediumTest | Level1)
{
cout << "start test testFingerprintAuthTestGetProperty003" << endl;
std::vector<uint64_t> templateIdList;
FillTestUint64Vector(parcel, templateIdList);
std::vector<GetPropertyType> propertyTypes;
GetPropertyType ptype = OHOS::HDI::FingerprintAuth::V1_1::REMAIN_ATTEMPTS;
propertyTypes.push_back(ptype);
Property property;
FillTestProperty(parcel, property);
int32_t ret = g_executorImpl.GetProperty(templateIdList, propertyTypes, property);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_FingerprintAuth_HDI_GetProperty_0500
* @tc.name testFingerprintAuthTestGetProperty004
* @tc.desc test GetProperty ptype ENROLL_PROGRESS
*/
HWTEST_F(UserIamFingerprintAuthTestAdditional, testFingerprintAuthTestGetProperty004, Function | MediumTest | Level1)
{
cout << "start test testFingerprintAuthTestGetProperty004" << endl;
std::vector<uint64_t> templateIdList;
FillTestUint64Vector(parcel, templateIdList);
std::vector<GetPropertyType> propertyTypes;
GetPropertyType ptype = OHOS::HDI::FingerprintAuth::V1_1::ENROLL_PROGRESS;
propertyTypes.push_back(ptype);
Property property;
FillTestProperty(parcel, property);
int32_t ret = g_executorImpl.GetProperty(templateIdList, propertyTypes, property);
cout << "ret is " << ret << endl;
EXPECT_EQ(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_FingerprintAuth_HDI_GetProperty_0600
* @tc.name testFingerprintAuthTestGetProperty005
* @tc.desc test GetProperty ptype SENSOR_INFO
*/
HWTEST_F(UserIamFingerprintAuthTestAdditional, testFingerprintAuthTestGetProperty005, Function | MediumTest | Level1)
{
cout << "start test testFingerprintAuthTestGetProperty005" << endl;
std::vector<uint64_t> templateIdList;
FillTestUint64Vector(parcel, templateIdList);
std::vector<GetPropertyType> propertyTypes;
GetPropertyType ptype = OHOS::HDI::FingerprintAuth::V1_1::SENSOR_INFO;
propertyTypes.push_back(ptype);
propertyTypes.push_back(OHOS::HDI::FingerprintAuth::V1_1::AUTH_SUB_TYPE);
propertyTypes.push_back(OHOS::HDI::FingerprintAuth::V1_1::LOCKOUT_DURATION);
propertyTypes.push_back(OHOS::HDI::FingerprintAuth::V1_1::REMAIN_ATTEMPTS);
propertyTypes.push_back(OHOS::HDI::FingerprintAuth::V1_1::ENROLL_PROGRESS);
propertyTypes.push_back(OHOS::HDI::FingerprintAuth::V1_1::SENSOR_INFO);
Property property;
FillTestProperty(parcel, property);
int32_t ret = g_executorImpl.GetProperty(templateIdList, propertyTypes, property);

View File

@ -1087,7 +1087,7 @@ HWTEST_F(UserIamPinAuthTestAdditional, testPinAuthTestSendCommand009, Function |
/**
* @tc.number SUB_Security_Iam_PinAuth_HDI_GetProperty_0200
* @tc.name testPinAuthTestGetProperty001
* @tc.desc test GetProperty propertyTypes AUTH_SUB_TYPE
* @tc.desc test GetProperty propertyTypes enum
*/
HWTEST_F(UserIamPinAuthTestAdditional, testPinAuthTestGetProperty001, Function | MediumTest | Level2)
{
@ -1096,43 +1096,7 @@ HWTEST_F(UserIamPinAuthTestAdditional, testPinAuthTestGetProperty001, Function |
FillTestUint64Vector(parcel, templateIdList);
std::vector<GetPropertyType> propertyTypes;
propertyTypes.push_back(OHOS::HDI::PinAuth::V1_1::AUTH_SUB_TYPE);
Property property;
int32_t ret = g_executorImpl.GetProperty(templateIdList, propertyTypes, property);
cout << "ret is " << ret << endl;
EXPECT_NE(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_PinAuth_HDI_GetProperty_0300
* @tc.name testPinAuthTestGetProperty002
* @tc.desc test GetProperty propertyTypes LOCKOUT_DURATION
*/
HWTEST_F(UserIamPinAuthTestAdditional, testPinAuthTestGetProperty002, Function | MediumTest | Level2)
{
cout << "start GetProperty" << endl;
std::vector<uint64_t> templateIdList;
FillTestUint64Vector(parcel, templateIdList);
std::vector<GetPropertyType> propertyTypes;
propertyTypes.push_back(OHOS::HDI::PinAuth::V1_1::LOCKOUT_DURATION);
Property property;
int32_t ret = g_executorImpl.GetProperty(templateIdList, propertyTypes, property);
cout << "ret is " << ret << endl;
EXPECT_NE(ret, 0);
}
/**
* @tc.number SUB_Security_Iam_PinAuth_HDI_GetProperty_0400
* @tc.name testPinAuthTestGetProperty003
* @tc.desc test GetProperty propertyTypes REMAIN_ATTEMPTS
*/
HWTEST_F(UserIamPinAuthTestAdditional, testPinAuthTestGetProperty003, Function | MediumTest | Level2)
{
cout << "start GetProperty" << endl;
std::vector<uint64_t> templateIdList;
FillTestUint64Vector(parcel, templateIdList);
std::vector<GetPropertyType> propertyTypes;
propertyTypes.push_back(OHOS::HDI::PinAuth::V1_1::REMAIN_ATTEMPTS);
Property property;