Skip to content

Commit 036f9c8

Browse files
author
Oscar Andreasson
committed
Added comments to serialHelper
1 parent 934a77e commit 036f9c8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/arduino-mock/serialHelper.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1+
/*
2+
* serialHelper - helper functions for unittesting serial functions.
3+
*
4+
*/
15
#ifndef SERIALHELPER_H
26
#define SERIALHELPER_H
37

8+
49
/*
10+
* stringCapture
511
* This is a helper class which can be Invoked on EXPECT_CALL to gather data
612
* from repeated calls to Serial functions. For example usage, see the unit
713
* tests in test/serial_unittest.cc
814
*
15+
* Example usage:
16+
*
17+
* EXPECT_CALL(*sm, write(Matcher<const uint8_t*>(_), (_)))
18+
* .Times(AtLeast(1))
19+
* .WillRepeatedly(Invoke(&c, &stringCapture::captureCStr));
20+
*
921
*/
1022
class stringCapture {
1123
public:

0 commit comments

Comments
 (0)