| 41 | |
| 42 | namespace { |
| 43 | bool 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 | |
| 58 | TGFX_TEST(PDFExportTest, Empty) { |
no test coverage detected