MdePkg/Test: Add google tests for BaseLib

Add GoogleTestBaseLib, which contains gtest unit tests for BaseLib.
For now, only add checksum tests for CRC32C and CRC16; these tests check
for correctness on various inputs using precomputed hashes.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
Pedro Falcato
2023-11-29 18:46:11 -08:00
committed by mergify[bot]
parent e2d4f75913
commit 3e133f730b
4 changed files with 118 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
/** @file
Main routine for BaseLib google tests.
Copyright (c) 2023 Pedro Falcato. All rights reserved<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <gtest/gtest.h>
int
main (
int argc,
char *argv[]
)
{
testing::InitGoogleTest (&argc, argv);
return RUN_ALL_TESTS ();
}