Software APIs
mock_manifest.h
1 // Copyright lowRISC contributors (OpenTitan project).
2 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3 // SPDX-License-Identifier: Apache-2.0
4 
5 #ifndef OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_MOCK_MANIFEST_H_
6 #define OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_MOCK_MANIFEST_H_
7 
8 #include "sw/device/lib/base/global_mock.h"
9 #include "sw/device/silicon_creator/lib/manifest.h"
10 #include "sw/device/silicon_creator/testing/rom_test.h"
11 
12 namespace rom_test {
13 namespace internal {
14 
15 /**
16  * Mock class for manifest.h.
17  */
18 class MockManifest : public global_mock::GlobalMock<MockManifest> {
19  public:
20  MOCK_METHOD(rom_error_t, Check, (const manifest_t *));
21  MOCK_METHOD(manifest_digest_region_t, DigestRegion, (const manifest_t *));
22  MOCK_METHOD(epmp_region_t, CodeRegion, (const manifest_t *));
23  MOCK_METHOD(uintptr_t, EntryPoint, (const manifest_t *));
24 };
25 
26 } // namespace internal
27 
28 using MockManifest = testing::StrictMock<internal::MockManifest>;
29 
30 } // namespace rom_test
31 
32 #endif // OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_MOCK_MANIFEST_H_