stuff-from-scratch/test/publishing/TestPdfWriter.cpp
2022-11-29 18:00:19 +00:00

19 lines
435 B
C++

#include "PdfDocument.h"
#include "PdfWriter.h"
#include "PdfObject.h"
#include "File.h"
#include "TestFramework.h"
TEST_CASE(TestPdfWriter, "publishing")
{
auto document = std::make_unique<PdfDocument>();
PdfWriter writer;
const auto output = writer.ToString(document);
File pdf_file("TestPdfWriter.pdf");
pdf_file.SetAccessMode(File::AccessMode::Write);
pdf_file.Open();
pdf_file.WriteText(output);
}