File tree 2 files changed +26
-0
lines changed
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ set(TEST_SRCS
28
28
src/Common/test_makeWord.cpp
29
29
src/Common/test_max.cpp
30
30
src/Common/test_min.cpp
31
+ src/Print/test_clearWriteError.cpp
31
32
src/Print/test_getWriteError.cpp
32
33
src/Print/test_print.cpp
33
34
src/Ringbuffer/test_available.cpp
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2020 Arduino. All rights reserved.
3
+ */
4
+
5
+ /* *************************************************************************************
6
+ * INCLUDE
7
+ **************************************************************************************/
8
+
9
+ #include < catch.hpp>
10
+
11
+ #include < Print.h>
12
+
13
+ #include < PrintMock.h>
14
+
15
+ /* *************************************************************************************
16
+ * TEST CODE
17
+ **************************************************************************************/
18
+
19
+ TEST_CASE (" Clear write error should set the error code back to 0" , " [Print-clearWriteError-01]" )
20
+ {
21
+ PrintMock mock;
22
+ mock.mock_setWriteError (5 );
23
+ mock.clearWriteError ();
24
+ REQUIRE (mock.getWriteError () == 0 );
25
+ }
You can’t perform that action at this time.
0 commit comments