MdePkg: Add gmock examples
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389 Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Chris Johnson <chris.n.johnson@intel.com> Acked-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Oliver Smith-Denny <osde@linux.microsoft.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
e4af282e9f
commit
09458c2b0b
@@ -0,0 +1,12 @@
|
||||
/** @file
|
||||
Google Test mocks for UefiLib
|
||||
|
||||
Copyright (c) 2022, Intel Corporation. All rights reserved.
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
**/
|
||||
#include <GoogleTest/Library/MockUefiLib.h>
|
||||
|
||||
MOCK_INTERFACE_DEFINITION(MockUefiLib);
|
||||
|
||||
MOCK_FUNCTION_DEFINITION(MockUefiLib, GetVariable2, 4, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockUefiLib, GetEfiGlobalVariable2, 3, EFIAPI);
|
@@ -0,0 +1,33 @@
|
||||
## @file
|
||||
# Google Test mocks for UefiLib
|
||||
#
|
||||
# Copyright (c) 2022, Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
##
|
||||
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = MockUefiLib
|
||||
FILE_GUID = 47211F7A-6D90-4DFB-BDF9-610B69197C2E
|
||||
MODULE_TYPE = HOST_APPLICATION
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = UefiLib
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64
|
||||
#
|
||||
|
||||
[Sources]
|
||||
MockUefiLib.cpp
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
GoogleTestLib
|
||||
|
||||
[BuildOptions]
|
||||
MSFT:*_*_*_CC_FLAGS = /EHsc
|
Reference in New Issue
Block a user