forked from arduino/ArduinoCore-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrintMock.h
29 lines (22 loc) · 781 Bytes
/
PrintMock.h
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
/*
* Copyright (c) 2020 Arduino. All rights reserved.
*/
#ifndef PRINT_MOCK_H_
#define PRINT_MOCK_H_
/**************************************************************************************
* INCLUDE
**************************************************************************************/
#include <string>
#include <api/Print.h>
/**************************************************************************************
* CLASS DECLARATION
**************************************************************************************/
class PrintMock : public Print
{
public:
std::string _str;
virtual size_t write(uint8_t b) override;
void mock_setWriteError() { setWriteError(); }
void mock_setWriteError(int err) { setWriteError(err); }
};
#endif /* PRINT_MOCK_H_ */