summaryrefslogtreecommitdiff
path: root/MdePkg/Test/Mock/Include/GoogleTest/Library/MockPciExpressLib.h
blob: cb011c1dbef139a0a8cbf9ec67d75fd0b0e32693 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/** @file MockPciExpressLib.h
  Google Test mocks for PciExpressLib

  Copyright (c) Microsoft Corporation.
  SPDX-License-Identifier: BSD-2-Clause-Patent
**/

#pragma once

#include <Library/GoogleTestLib.h>
#include <Library/FunctionMockLib.h>
extern "C" {
  #include <Uefi.h>
  #include <Library/PciExpressLib.h>
}

struct MockPciExpressLib {
  MOCK_INTERFACE_DECLARATION (MockPciExpressLib);

  MOCK_FUNCTION_DECLARATION (
    UINT8,
    PciExpressRead8,
    (
     IN UINTN  Address
    )
    );
  MOCK_FUNCTION_DECLARATION (
    UINT16,
    PciExpressRead16,
    (
     IN UINTN  Address
    )
    );

  MOCK_FUNCTION_DECLARATION (
    UINT32,
    PciExpressRead32,
    (
     IN UINTN  Address
    )
    );
};