diff options
Diffstat (limited to 'test/core/model/TestDomain.hpp')
-rw-r--r-- | test/core/model/TestDomain.hpp | 12 |
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)}; |