修复调试发现的问题1104

Signed-off-by: yangyang <yangyang651@h-partners.com>
This commit is contained in:
yangyang 2024-11-04 09:55:31 +08:00
parent 078b46ab91
commit 84be75b5ab
4 changed files with 521 additions and 3 deletions

View File

@ -47,12 +47,16 @@ bool GetDownloadableProfileMetadataResult::ReadFromParcel(Parcel &parcel)
int32_t resolvableErrorsValue;
int32_t resultValue;
int32_t profileClassValue;
if (!parcel.ReadInt32(pprType_) || !parcel.ReadBool(pprFlag_) ||
!parcel.ReadInt32(resolvableErrorsValue) || !parcel.ReadInt32(resultValue)) {
!parcel.ReadInt32(resolvableErrorsValue) || !parcel.ReadInt32(resultValue) ||
!parcel.ReadString16(serviceProviderName_) || !parcel.ReadString16(profileName_) ||
!parcel.ReadString16(iccId_) || !parcel.ReadInt32(profileClassValue)) {
return false;
}
resolvableErrors_ = static_cast<SolvableErrors>(resolvableErrorsValue);
result_ = static_cast<ResultState>(resultValue);
profileClass_ = static_cast<ProfileClass>(profileClassValue);
return true;
}
@ -75,7 +79,9 @@ bool GetDownloadableProfileMetadataResult::Marshalling(Parcel &parcel) const
if (!parcel.WriteInt32(pprType_) || !parcel.WriteBool(pprFlag_) ||
!parcel.WriteInt32(static_cast<int32_t>(resolvableErrors_)) ||
!parcel.WriteInt32(static_cast<int32_t>(result_))) {
!parcel.WriteInt32(static_cast<int32_t>(result_)) || !parcel.WriteString16(serviceProviderName_) ||
!parcel.WriteString16(profileName_) || !parcel.WriteString16(iccId_) ||
!parcel.WriteInt32(static_cast<int32_t>(profileClass_))) {
return false;
}
return true;

View File

@ -34,6 +34,10 @@ struct GetDownloadableProfileMetadataResult : public Parcelable {
bool pprFlag_ = false;
SolvableErrors resolvableErrors_;
ResultState result_;
std::u16string serviceProviderName_ = u"";
std::u16string profileName_ = u"";
std::u16string iccId_ = u"";
ProfileClass profileClass_;
bool ReadFromParcel(Parcel &parcel);
virtual bool Marshalling(Parcel &parcel) const override;

View File

@ -2309,7 +2309,7 @@ bool EsimFile::ProcessRetrieveNotificationListDone(const AppExecFwk::InnerEvent:
{
if (event == nullptr) {
TELEPHONY_LOGE("event is nullptr");
NotifyReady(retrieveNotificationListMutex_, isRetrieveNotificationListReady_, retrieveNotificationListCv_);
NotifyReady(retrieveNotificationListMutex_, isRetrieveNotificationListReady_, retrieveNotificationListCv_);
return false;
}
std::shared_ptr<Asn1Node> root = ParseEvent(event);

View File

@ -48,6 +48,7 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0100, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -58,6 +59,9 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0100, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -74,6 +78,7 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0200, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -84,6 +89,9 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0200, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -100,6 +108,7 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0300, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -110,6 +119,9 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0300, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -126,6 +138,7 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0400, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -136,6 +149,9 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0400, Function | MediumTest |
readString16List.push_back(false);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -152,6 +168,7 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0500, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(false, 1);
@ -162,6 +179,9 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0500, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -178,6 +198,7 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0600, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -188,6 +209,9 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0600, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(false);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -204,6 +228,7 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0700, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -214,6 +239,9 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0700, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(false);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -230,6 +258,7 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0800, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -240,6 +269,9 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0800, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -256,6 +288,7 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0900, Function | MediumTest |
readInt32List.push_back(false);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -266,6 +299,9 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_0900, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -282,6 +318,7 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_1000, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -292,6 +329,9 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_1000, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(false);
@ -308,6 +348,7 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_1100, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(false);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -318,6 +359,9 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_1100, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -334,6 +378,7 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_1200, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(false);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -344,6 +389,129 @@ HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_1200, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
EXPECT_FALSE(metadata.ReadFromParcel(parcel));
ResetParcelState();
}
HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_1300, Function | MediumTest | Level1)
{
GetDownloadableProfileMetadataResult metadata;
Parcel parcel;
std::list<bool> readInt32List;
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
std::list<bool> readString16List;
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(false);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
EXPECT_FALSE(metadata.ReadFromParcel(parcel));
ResetParcelState();
}
HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_1400, Function | MediumTest | Level1)
{
GetDownloadableProfileMetadataResult metadata;
Parcel parcel;
std::list<bool> readInt32List;
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
std::list<bool> readString16List;
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(false);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
EXPECT_FALSE(metadata.ReadFromParcel(parcel));
ResetParcelState();
}
HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_1500, Function | MediumTest | Level1)
{
GetDownloadableProfileMetadataResult metadata;
Parcel parcel;
std::list<bool> readInt32List;
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
std::list<bool> readString16List;
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(false);
MockReadString16(true, &readString16List);
MockReadBool(true);
EXPECT_FALSE(metadata.ReadFromParcel(parcel));
ResetParcelState();
}
HWTEST_F(ProfileMetadataResultTest, ReadFromParcel_1600, Function | MediumTest | Level1)
{
GetDownloadableProfileMetadataResult metadata;
Parcel parcel;
std::list<bool> readInt32List;
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(false);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
std::list<bool> readString16List;
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -361,6 +529,7 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0100, Function | MediumTest | Le
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
@ -371,6 +540,9 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0100, Function | MediumTest | Le
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
@ -388,6 +560,7 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0200, Function | MediumTest | Le
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
@ -398,6 +571,9 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0200, Function | MediumTest | Le
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
@ -415,6 +591,7 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0300, Function | MediumTest | Le
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
@ -425,6 +602,9 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0300, Function | MediumTest | Le
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
@ -442,6 +622,7 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0400, Function | MediumTest | Le
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
@ -452,6 +633,9 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0400, Function | MediumTest | Le
writeString16List.push_back(false);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
@ -469,6 +653,7 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0500, Function | MediumTest | Le
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(false);
@ -479,6 +664,9 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0500, Function | MediumTest | Le
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
@ -496,6 +684,7 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0600, Function | MediumTest | Le
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
@ -506,6 +695,9 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0600, Function | MediumTest | Le
writeString16List.push_back(true);
writeString16List.push_back(false);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
@ -523,6 +715,7 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0700, Function | MediumTest | Le
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
@ -533,6 +726,9 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0700, Function | MediumTest | Le
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(false);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
@ -550,6 +746,7 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0800, Function | MediumTest | Le
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
@ -560,6 +757,9 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0800, Function | MediumTest | Le
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
@ -577,6 +777,7 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0900, Function | MediumTest | Le
writeInt32List.push_back(false);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
@ -587,6 +788,9 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_0900, Function | MediumTest | Le
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
@ -604,6 +808,7 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_1000, Function | MediumTest | Le
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
@ -614,6 +819,9 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_1000, Function | MediumTest | Le
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(false);
@ -631,6 +839,7 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_1100, Function | MediumTest | Le
writeInt32List.push_back(true);
writeInt32List.push_back(false);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
@ -641,6 +850,9 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_1100, Function | MediumTest | Le
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
@ -658,6 +870,7 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_1200, Function | MediumTest | Le
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(false);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
@ -668,6 +881,133 @@ HWTEST_F(ProfileMetadataResultTest, Marshalling_1200, Function | MediumTest | Le
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
EXPECT_FALSE(metadata.Marshalling(parcel));
ResetParcelState();
}
HWTEST_F(ProfileMetadataResultTest, Marshalling_1300, Function | MediumTest | Level1)
{
GetDownloadableProfileMetadataResult metadata;
Parcel parcel;
metadata.downloadableProfiles_.accessRules_.resize(1);
std::list<bool> writeInt32List;
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
std::list<bool> writeString16List;
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(false);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
EXPECT_FALSE(metadata.Marshalling(parcel));
ResetParcelState();
}
HWTEST_F(ProfileMetadataResultTest, Marshalling_1400, Function | MediumTest | Level1)
{
GetDownloadableProfileMetadataResult metadata;
Parcel parcel;
metadata.downloadableProfiles_.accessRules_.resize(1);
std::list<bool> writeInt32List;
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
std::list<bool> writeString16List;
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(false);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
EXPECT_FALSE(metadata.Marshalling(parcel));
ResetParcelState();
}
HWTEST_F(ProfileMetadataResultTest, Marshalling_1500, Function | MediumTest | Level1)
{
GetDownloadableProfileMetadataResult metadata;
Parcel parcel;
metadata.downloadableProfiles_.accessRules_.resize(1);
std::list<bool> writeInt32List;
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
std::list<bool> writeString16List;
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(false);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
EXPECT_FALSE(metadata.Marshalling(parcel));
ResetParcelState();
}
HWTEST_F(ProfileMetadataResultTest, Marshalling_1600, Function | MediumTest | Level1)
{
GetDownloadableProfileMetadataResult metadata;
Parcel parcel;
metadata.downloadableProfiles_.accessRules_.resize(1);
std::list<bool> writeInt32List;
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(true);
writeInt32List.push_back(false);
MockWriteInt32(true, &writeInt32List);
MockWriteUint32(true);
std::list<bool> writeString16List;
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
writeString16List.push_back(true);
MockWriteString16(true, &writeString16List);
MockWriteBool(true);
@ -684,6 +1024,7 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0100, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -694,6 +1035,9 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0100, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -710,6 +1054,7 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0200, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -720,6 +1065,9 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0200, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -736,6 +1084,7 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0300, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -746,6 +1095,9 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0300, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -762,6 +1114,7 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0400, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -772,6 +1125,9 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0400, Function | MediumTest |
readString16List.push_back(false);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -788,6 +1144,7 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0500, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(false, 1);
@ -798,6 +1155,9 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0500, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -814,6 +1174,7 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0600, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -824,6 +1185,9 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0600, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(false);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -840,6 +1204,7 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0700, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -850,6 +1215,9 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0700, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(false);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -866,6 +1234,7 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0800, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -876,6 +1245,9 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0800, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -892,6 +1264,7 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0900, Function | MediumTest |
readInt32List.push_back(false);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -902,6 +1275,9 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_0900, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -918,6 +1294,7 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_1000, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -928,6 +1305,9 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_1000, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(false);
@ -944,6 +1324,7 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_1100, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(false);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -954,6 +1335,9 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_1100, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
@ -970,6 +1354,7 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_1200, Function | MediumTest |
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(false);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
@ -980,6 +1365,129 @@ HWTEST_F(ProfileMetadataResultTest, Unmarshalling_1200, Function | MediumTest |
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
EXPECT_EQ(metadata.Unmarshalling(parcel), nullptr);
ResetParcelState();
}
HWTEST_F(ProfileMetadataResultTest, Unmarshalling_1300, Function | MediumTest | Level1)
{
GetDownloadableProfileMetadataResult metadata;
Parcel parcel;
std::list<bool> readInt32List;
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
std::list<bool> readString16List;
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(false);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
EXPECT_EQ(metadata.Unmarshalling(parcel), nullptr);
ResetParcelState();
}
HWTEST_F(ProfileMetadataResultTest, Unmarshalling_1400, Function | MediumTest | Level1)
{
GetDownloadableProfileMetadataResult metadata;
Parcel parcel;
std::list<bool> readInt32List;
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
std::list<bool> readString16List;
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(false);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);
EXPECT_EQ(metadata.Unmarshalling(parcel), nullptr);
ResetParcelState();
}
HWTEST_F(ProfileMetadataResultTest, Unmarshalling_1500, Function | MediumTest | Level1)
{
GetDownloadableProfileMetadataResult metadata;
Parcel parcel;
std::list<bool> readInt32List;
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
std::list<bool> readString16List;
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(false);
MockReadString16(true, &readString16List);
MockReadBool(true);
EXPECT_EQ(metadata.Unmarshalling(parcel), nullptr);
ResetParcelState();
}
HWTEST_F(ProfileMetadataResultTest, Unmarshalling_1600, Function | MediumTest | Level1)
{
GetDownloadableProfileMetadataResult metadata;
Parcel parcel;
std::list<bool> readInt32List;
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(true);
readInt32List.push_back(false);
MockReadInt32(true, &readInt32List);
MockReadUint32(true, 1);
std::list<bool> readString16List;
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
readString16List.push_back(true);
MockReadString16(true, &readString16List);
MockReadBool(true);