Nan Zhou | 042b5ba | 2021-06-18 09:32:45 -0700 | [diff] [blame^] | 1 | // SPDX-License-Identifier: Apache-2.0 |
| 2 | // Copyright (C) 2021 GOOGLE |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "host_console.hpp" |
| 7 | |
| 8 | #include <gmock/gmock.h> |
| 9 | |
| 10 | class HostConsoleMock : public HostConsole |
| 11 | { |
| 12 | public: |
| 13 | HostConsoleMock() : HostConsole("") |
| 14 | {} |
| 15 | MOCK_METHOD(void, connect, (), (override)); |
| 16 | MOCK_METHOD(size_t, read, (char* buf, size_t sz), (const, override)); |
| 17 | // Returns a fixed integer for testing. |
| 18 | virtual operator int() const override |
| 19 | { |
| 20 | return 1; |
| 21 | }; |
| 22 | }; |