summaryrefslogtreecommitdiff
path: root/test/core/model/TestDomain.hpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-15 00:27:11 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-15 00:27:11 +0100
commit253492406f04657fe71e6c0c6603496241280478 (patch)
tree5a9c1b785a5559025ff7d26bf9ed880ce98ff0ce /test/core/model/TestDomain.hpp
parent551b7be64f207845cb05b8ec593f9bf2d7f0c940 (diff)
parentb708dd4cce828c1089a18fefcc22804f7cdad908 (diff)
Merge branch 'master' into astoecke_parser_stack_new
Conflicts: application/CMakeLists.txt application/src/core/parser/stack/DocumentHandler.hpp application/src/core/parser/stack/DomainHandler.hpp application/src/core/parser/stack/ImportIncludeHandler.hpp
Diffstat (limited to 'test/core/model/TestDomain.hpp')
-rw-r--r--test/core/model/TestDomain.hpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/core/model/TestDomain.hpp b/test/core/model/TestDomain.hpp
index 5ac510c..c107a0d 100644
--- a/test/core/model/TestDomain.hpp
+++ b/test/core/model/TestDomain.hpp
@@ -42,7 +42,7 @@ static Rooted<Domain> constructBookDomain(Manager &mgr,
mgr, "book", domain, single, {nullptr}, false, true)};
// The structure field of it.
- Rooted<FieldDescriptor> book_field{new FieldDescriptor(mgr, book)};
+ Rooted<FieldDescriptor> book_field = book->createFieldDescriptor(logger);
// From there on the "section".
Rooted<StructuredClass> section{
@@ -50,7 +50,8 @@ static Rooted<Domain> constructBookDomain(Manager &mgr,
book_field->addChild(section);
// And the field of it.
- Rooted<FieldDescriptor> section_field{new FieldDescriptor(mgr, section)};
+ Rooted<FieldDescriptor> section_field =
+ section->createFieldDescriptor(logger);
// We also add the "paragraph", which is transparent.
Rooted<StructuredClass> paragraph{new StructuredClass(
@@ -59,8 +60,8 @@ static Rooted<Domain> constructBookDomain(Manager &mgr,
book_field->addChild(paragraph);
// And the field of it.
- Rooted<FieldDescriptor> paragraph_field{
- new FieldDescriptor(mgr, paragraph)};
+ Rooted<FieldDescriptor> paragraph_field =
+ paragraph->createFieldDescriptor(logger);
// We append "subsection" to section.
Rooted<StructuredClass> subsection{
@@ -68,8 +69,8 @@ static Rooted<Domain> constructBookDomain(Manager &mgr,
section_field->addChild(subsection);
// And the field of it.
- Rooted<FieldDescriptor> subsection_field{
- new FieldDescriptor(mgr, subsection)};
+ Rooted<FieldDescriptor> subsection_field =
+ subsection->createFieldDescriptor(logger);
// and we add the paragraph to subsections fields
subsection_field->addChild(paragraph);
@@ -80,9 +81,8 @@ static Rooted<Domain> constructBookDomain(Manager &mgr,
paragraph_field->addChild(text);
// ... and has a primitive field.
- Rooted<FieldDescriptor> text_field{new FieldDescriptor(
- mgr, text, domain->getTypesystems()[0]->getTypes()[0],
- DEFAULT_FIELD_NAME, false)};
+ Rooted<FieldDescriptor> text_field =
+ text->createPrimitiveFieldDescriptor(sys->getStringType(), logger);
return domain;
}