MCPcopy Create free account
hub / github.com/apache/cloudberry / MockRead

Class MockRead

gpcontrib/gpcloud/test/s3bucket_reader_test.cpp:172–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172class MockRead {
173 public:
174 MockRead(const char* ptr) : p(ptr) {
175 size = strlen(p);
176 }
177 uint64_t operator()(char* buf, uint64_t len) {
178 memcpy(buf, p, size);
179 return size;
180 }
181
182 private:
183 const char* p;
184 uint64_t size;
185};
186
187TEST_F(S3BucketReaderTest, ReadBucketFileWithHeader) {
188 hasHeader = true;

Callers 1

TEST_FFunction · 0.70

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.56