Skip to content

Commit

Permalink
test: crypto module testcase (#863)
Browse files Browse the repository at this point in the history
* testcase added to crypto module for code coverage

Signed-off-by: Guru Mehar Rachaputi <[email protected]>
  • Loading branch information
00thirdeye00 authored Aug 20, 2024
1 parent 6336aca commit a100153
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/modules/crypto_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,20 @@ TEST_F(CryptoTest, ChecksSHA256HashWithLongData)
ASSERT_TRUE(isSHA256Hash(generatedRandomHash));
}

TEST_F(CryptoTest, ShouldGenerateSHA256HashWithDataCodecov)
{
const auto generatedRandomHash = sha256("b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde");

ASSERT_EQ(generatedRandomHash.length(), 64);
}

TEST_F(CryptoTest, ChecksSHA256HashWithDataCodecov)
{
const auto generatedRandomHash = sha256("b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde");

ASSERT_TRUE(isSHA256Hash(generatedRandomHash));
}

TEST_F(CryptoTest, ShouldGenerateMD5Hash)
{
const auto generatedRandomHash = md5();
Expand Down

0 comments on commit a100153

Please sign in to comment.