diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-04 19:40:21 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-04 19:40:21 +0100 |
commit | 319ad738f677a20403cc27192f1df7bb65ce8c0e (patch) | |
tree | b044fd7dd296ce9ecdfde318b243b7dc7bf86bf8 /test/plugins/html/DemoOutputTest.cpp | |
parent | 7d22aac0c7be52381822abdd0cb6860deaf01096 (diff) |
corrected first draft of DemoOutput. Still some TODOs remain, but for the easy test document everything works.
Diffstat (limited to 'test/plugins/html/DemoOutputTest.cpp')
-rw-r--r-- | test/plugins/html/DemoOutputTest.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/test/plugins/html/DemoOutputTest.cpp b/test/plugins/html/DemoOutputTest.cpp new file mode 100644 index 0000000..b81a001 --- /dev/null +++ b/test/plugins/html/DemoOutputTest.cpp @@ -0,0 +1,49 @@ +/* + Ousía + Copyright (C) 2014, 2015 Benjamin Paaßen, Andreas Stöckel + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include <gtest/gtest.h> + +#include <iostream> + +#include <plugins/html/DemoOutput.hpp> + +#include <core/model/Document.hpp> +#include <core/model/Domain.hpp> + +#include <core/model/TestDocument.hpp> +#include <core/model/TestDomain.hpp> + +namespace ousia { +namespace html { + +TEST(DemoHTMLTransformer, writeHTML) +{ + // Construct Manager + Logger logger; + Manager mgr{1}; + // Get the domain. + Rooted<model::Domain> domain = model::constructBookDomain(mgr, logger); + // Construct the document. + Rooted<model::Document> doc = model::constructBookDocument(mgr, domain); + + // print it + DemoHTMLTransformer transformer; + transformer.writeHTML(doc, std::cout); +} +} +} |