File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ set(TEST_SRCS
2828 src/Common/test_makeWord.cpp
2929 src/Common/test_max.cpp
3030 src/Common/test_min.cpp
31+ src/Print/test_clearWriteError.cpp
3132 src/Print/test_getWriteError.cpp
3233 src/Print/test_print.cpp
3334 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