MCPcopy Create free account
hub / github.com/Tencent/tgfx / ComparePDF

Function ComparePDF

test/src/PDFExportTest.cpp:43–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42namespace {
43bool ComparePDF(const std::shared_ptr<MemoryWriteStream>& stream, const std::string& key) {
44 auto data = stream->readData();
45#ifdef GENERATE_BASELINE_IMAGES
46 SaveFile(data, key + "_base.pdf");
47#endif
48 auto result = Baseline::Compare(data, key);
49 if (result) {
50 RemoveFile(key + ".pdf");
51 } else {
52 SaveFile(data, key + ".pdf");
53 }
54 return result;
55}
56} // namespace
57
58TGFX_TEST(PDFExportTest, Empty) {

Callers 1

TGFX_TESTFunction · 0.85

Calls 4

CompareFunction · 0.85
RemoveFileFunction · 0.85
SaveFileFunction · 0.50
readDataMethod · 0.45

Tested by

no test coverage detected