MCPcopy Create free account
hub / github.com/SpartanJ/eepp / read

Method read

src/tests/unit_tests/eterm_test.cpp:27–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25 return n;
26 }
27 int read( char* buf, size_t n, bool ) override {
28 if ( mBuffer.empty() )
29 return 0;
30 size_t toRead = std::min( n, mBuffer.size() );
31 memcpy( buf, mBuffer.data(), toRead );
32 mBuffer.erase( 0, toRead );
33 return toRead;
34 }
35};
36
37class MockProcess : public IProcess {

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected