Skip to content

Refactor read/write mock #314

@turuslan

Description

@turuslan

Removing size argument from Writer::writeSome/Reader::read/Reader::readSome would also require change in mock expectations.
Simplifying mock expectations would simplify such changes.

Starting code 834a55b changes "echo_test" as an example.

- EXPECT_CALL(*stream, readSome(_, _, _)).WillOnce(SetReadMsg(msg));
+ EXPECT_CALL_READ(*stream).WILL_READ(msg_bytes);
- EXPECT_CALL(*stream, writeSome(_, _, _)).WillOnce(WriteMsgAssertEqual(msg));
+ EXPECT_CALL_WRITE(*stream).WILL_WRITE(msg_bytes);

Related to #203.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions