MCPcopy Create free account
hub / github.com/Tencent/rapidjson / CompareBufferFile

Method CompareBufferFile

test/unittest/encodedstreamtest.cpp:240–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238 }
239
240 bool CompareBufferFile(const char* actualBuffer, size_t actualLength, const char* expectedFilename) {
241 size_t expectedLength;
242 char* expectedBuffer = ReadFile(expectedFilename, true, &expectedLength);
243 bool ret = (expectedLength == actualLength) && memcmp(expectedBuffer, actualBuffer, actualLength) == 0;
244 free(expectedBuffer);
245 return ret;
246 }
247
248 char *json_;
249 size_t length_;

Callers

nothing calls this directly

Calls 1

ReadFileFunction · 0.70

Tested by

no test coverage detected