Software APIs
mock_shutdown.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_SHUTDOWN_H_
6 #define OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_MOCK_SHUTDOWN_H_
7 
8 #include "sw/device/lib/base/global_mock.h"
9 #include "sw/device/silicon_creator/lib/shutdown.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 shutdown.
17  */
18 class MockShutdown : public global_mock::GlobalMock<MockShutdown> {
19  public:
20  MOCK_METHOD(shutdown_error_redact_t, RedactPolicy, ());
21  MOCK_METHOD(uint32_t, Redact, (rom_error_t, shutdown_error_redact_t));
22  MOCK_METHOD(void, Finalize, (rom_error_t));
23 };
24 
25 } // namespace internal
26 
27 using MockShutdown = testing::StrictMock<internal::MockShutdown>;
28 
29 } // namespace rom_test
30 
31 #endif // OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_MOCK_SHUTDOWN_H_