summaryrefslogtreecommitdiff
path: root/test/core/model/TestDomain.hpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-08 17:20:56 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-08 17:20:56 +0100
commit7269e0e232c7971248ffa47aa2ae44786f3d303a (patch)
treeeabdb8a545efd86a3aab3f63deb806e33f08d7a0 /test/core/model/TestDomain.hpp
parent33b92b72ed160f22dc627e841d5f84de4ebc0c6c (diff)
slight changes to Domain and Document. Started to add a more advanced test document creation function as well as the respective domain creation functions. The DemoOutputTest for it looks good so far.
Diffstat (limited to 'test/core/model/TestDomain.hpp')
-rw-r--r--test/core/model/TestDomain.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/core/model/TestDomain.hpp b/test/core/model/TestDomain.hpp
index 54e79ee..aa3096d 100644
--- a/test/core/model/TestDomain.hpp
+++ b/test/core/model/TestDomain.hpp
@@ -69,6 +69,18 @@ static Rooted<Domain> constructBookDomain(Manager &mgr,
new FieldDescriptor(mgr, paragraph)};
paragraph->getFieldDescriptors().push_back(paragraph_field);
+ // We append "subsection" to section.
+ Rooted<StructuredClass> subsection{
+ new StructuredClass(mgr, "subsection", domain, any)};
+ section_field->getChildren().push_back(subsection);
+ domain->getStructureClasses().push_back(subsection);
+ // And the field of it.
+ Rooted<FieldDescriptor> subsection_field{
+ new FieldDescriptor(mgr, subsection)};
+ subsection->getFieldDescriptors().push_back(subsection_field);
+ // and we add the paragraph to subsections fields
+ subsection_field->getChildren().push_back(paragraph);
+
// Finally we add the "text" node, which is transparent as well.
Rooted<StructuredClass> text{new StructuredClass(
mgr, "text", domain, any, {nullptr}, {nullptr}, true)};