29 lines
609 B
C++
29 lines
609 B
C++
|
#include "SvgWriter.h"
|
||
|
#include "SvgDocument.h"
|
||
|
#include "SvgConverter.h"
|
||
|
#include "Scene.h"
|
||
|
|
||
|
#include "CircleNode.h"
|
||
|
|
||
|
#include "File.h"
|
||
|
|
||
|
#include "TestFramework.h"
|
||
|
#include "TestUtils.h"
|
||
|
|
||
|
TEST_CASE(TestSvgConverter, "[publishing]")
|
||
|
{
|
||
|
Scene scene;
|
||
|
|
||
|
CircleNode circle({10, 10}, 20);
|
||
|
scene.addNode(&circle);
|
||
|
|
||
|
SvgConverter converter;
|
||
|
auto svg_document = converter.convert(&scene);
|
||
|
|
||
|
SvgWriter writer;
|
||
|
auto content = writer.toString(svg_document.get());
|
||
|
|
||
|
auto outFile = std::make_unique<File>(TestUtils::getTestOutputDir(__FILE__) / "scene.svg");
|
||
|
outFile->writeText(content);
|
||
|
}
|