arduino-emulator
Loading...
Searching...
No Matches
PrintMock.h
1/*
2 * Copyright (c) 2020 Arduino. All rights reserved.
3 *
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6
7#ifndef PRINT_MOCK_H_
8#define PRINT_MOCK_H_
9
10/**************************************************************************************
11 * INCLUDE
12 **************************************************************************************/
13
14#include <string>
15
16#include <api/Print.h>
17
18/**************************************************************************************
19 * CLASS DECLARATION
20 **************************************************************************************/
21
22class PrintMock : public Print
23{
24public:
25 std::string _str;
26 virtual size_t write(uint8_t b) override;
27 void mock_setWriteError() { setWriteError(); }
28 void mock_setWriteError(int err) { setWriteError(err); }
29};
30
31#endif /* PRINT_MOCK_H_ */
Definition PrintMock.h:23