diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-15 14:18:07 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-15 14:18:07 +0100 |
commit | a1245cf2ad80cba0a71ffb184966ee77a7e166cc (patch) | |
tree | 98c593f0277743df25e9b57638c254da8ca0a3cb /test/core/model/TestDocument.hpp | |
parent | 2194293a5e33cc97a4cb91055ff75425ad14c3d0 (diff) |
Further simplified document buildup by doing the addition to parents of StructureNodes in the constructor and refactored Anchor as standalone class instead of AnnotationEntity child. This made some changes in the test bench necessary as well.
Diffstat (limited to 'test/core/model/TestDocument.hpp')
-rw-r--r-- | test/core/model/TestDocument.hpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/core/model/TestDocument.hpp b/test/core/model/TestDocument.hpp index eaec42c..2397fe6 100644 --- a/test/core/model/TestDocument.hpp +++ b/test/core/model/TestDocument.hpp @@ -60,11 +60,8 @@ static Rooted<Document> constructBookDocument(Manager &mgr, Logger &logger, } // And its primitive content Variant text{"Some introductory text"}; - Rooted<DocumentPrimitive> foreword_primitive = - buildPrimitiveEntity(logger, foreword_text, text, "content"); - if (foreword_primitive.isNull()) { - return {nullptr}; - } + Rooted<DocumentPrimitive> foreword_primitive{ + new DocumentPrimitive(mgr, foreword_text, text, "content")}; // Add a section. Rooted<StructuredEntity> section = buildStructuredEntity(doc, logger, root, {"section"}); @@ -82,8 +79,8 @@ static Rooted<Document> constructBookDocument(Manager &mgr, Logger &logger, } // And its primitive content text = Variant{"Some actual text"}; - Rooted<DocumentPrimitive> main_primitive = - buildPrimitiveEntity(logger, main_text, text, "content"); + Rooted<DocumentPrimitive> main_primitive{ + new DocumentPrimitive(mgr, main_text, text, "content")}; if (main_primitive.isNull()) { return {nullptr}; } |