File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed 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 < MillisFake.h>
12
+ #include < StreamMock.h>
13
+ #include < iostream>
14
+ /* *************************************************************************************
15
+ * TEST CODE
16
+ **************************************************************************************/
17
+
18
+ TEST_CASE (" Testing 'readString' with data available within the stream" , " [Stream-readString-01]" )
19
+ {
20
+ StreamMock mock;
21
+ mock.setTimeout (10 );
22
+ millis_autoOn ();
23
+ mock << " This is test stream content" ;
24
+
25
+ REQUIRE (mock.readString () == arduino::String (" This is test stream content" ));
26
+ }
You can’t perform that action at this time.
0 commit comments