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

20 lines
435 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"
TEST_CASE(TestPdfWriter, "publishing")
2022-01-01 18:46:31 +00:00
{
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);
}