Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitff7e4a6

Browse files
committed
Adding test code for Stream::readString
1 parent716c324 commitff7e4a6

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp