-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cherry-Pick]MdePkg: Add Google Test Library and Protocol
Mock Libraries: MdePkg\Test\Mock\Library\GoogleTest\MockCpuLib MdePkg\Test\Mock\Library\GoogleTest\MockPciSegmentLib MdePkg\Test\Mock\Library\GoogleTest\MockReportStatusCodeLib MdePkg\Test\Mock\Library\GoogleTest\MockSmmServicesTableLib Mock Protocol: MdePkg\Test\Mock\Include\GoogleTest\Protocol\MockMpService.h Signed-off-by: jack Hsieh <[email protected]> Cc: Maintainer Shruti Gupta <[email protected]> Cc: Reviewer Shruti Gupta <[email protected]>
- Loading branch information
Showing
13 changed files
with
863 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/** @file MockCpuLib.h | ||
Google Test mocks for the CPU Library | ||
Copyright (c) Microsoft Corporation. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#ifndef MOCK_CPU_LIB_H_ | ||
#define MOCK_CPU_LIB_H_ | ||
|
||
#include <Library/GoogleTestLib.h> | ||
#include <Library/FunctionMockLib.h> | ||
|
||
extern "C" { | ||
#include <Uefi.h> | ||
} | ||
|
||
struct MockCpuLib { | ||
MOCK_INTERFACE_DECLARATION (MockCpuLib); | ||
|
||
MOCK_FUNCTION_DECLARATION ( | ||
VOID, | ||
CpuSleep, | ||
( | ||
) | ||
); | ||
|
||
MOCK_FUNCTION_DECLARATION ( | ||
VOID, | ||
CpuFlushTlb, | ||
( | ||
) | ||
); | ||
|
||
MOCK_FUNCTION_DECLARATION ( | ||
VOID, | ||
InitializeFloatingPointUnits, | ||
( | ||
) | ||
); | ||
|
||
MOCK_FUNCTION_DECLARATION ( | ||
BOOLEAN, | ||
StandardSignatureIsAuthenticAMD, | ||
( | ||
) | ||
); | ||
|
||
MOCK_FUNCTION_DECLARATION ( | ||
UINT32, | ||
GetCpuFamilyModel, | ||
( | ||
) | ||
); | ||
|
||
MOCK_FUNCTION_DECLARATION ( | ||
UINT8, | ||
GetCpuSteppingId, | ||
( | ||
) | ||
); | ||
}; | ||
|
||
#endif |
Oops, something went wrong.