stuff-from-scratch/test/publishing/TestPdfWriter.cpp

19 lines
422 B
C++
Raw Normal View History

2022-01-01 18:46:31 +00:00
#include "PdfDocument.h"
#include "PdfWriter.h"
#include "PdfObject.h"
#include "File.h"
2022-11-29 18:00:19 +00:00
#include "TestFramework.h"
2022-12-01 10:52:48 +00:00
#include "TestUtils.h"
2022-11-29 18:00:19 +00:00
TEST_CASE(TestPdfWriter, "publishing")
2022-01-01 18:46:31 +00:00
{
auto document = std::make_unique<PdfDocument>();
PdfWriter writer;
2022-12-02 08:44:04 +00:00
const auto output = writer.toString(document.get());
2022-01-01 18:46:31 +00:00
2022-12-01 10:52:48 +00:00
File pdf_file(TestUtils::getTestOutputDir() / "TestPdfWriter.pdf");
pdf_file.writeText(output);
2022-01-01 18:46:31 +00:00
}