fix: EncodePrivateSyscap input null point should return true.

Signed-off-by: yudechen <chenyude@huawei.com>
Change-Id: I2ebf3fec0fd08a30763355f86ac7e35215016b61
This commit is contained in:
yudechen
2022-08-11 19:48:33 +08:00
parent ce7265fbbb
commit 104f846825
3 changed files with 8 additions and 4 deletions
+4 -1
View File
@@ -49,6 +49,9 @@ HWTEST_F(SyscapCodecTest, EncodePrivateSyscap, TestSize.Level1)
char *charPriInput = nullptr;
int priOutLen;
EXPECT_TRUE(EncodePrivateSyscap(&charPriInput, &priOutLen));
// Currently, private syscap is null.
EXPECT_EQ(charPriInput, nullptr);
EXPECT_EQ(priOutLen, 0);
free(charPriInput);
}
@@ -74,7 +77,7 @@ HWTEST_F(SyscapCodecTest, DecodeOsSyscap, TestSize.Level1)
/*
* @tc.name: DecodePrivateSyscap
* @tc.desc: Check the PrivateSyscap Decoding.
* @tc.desc: Check the null PrivateSyscap Decoding.
* @tc.type: FUNC
*/
HWTEST_F(SyscapCodecTest, DecodePrivateSyscap, TestSize.Level1)