summaryrefslogtreecommitdiff
path: root/test/core/model/TestDocumentBuilder.hpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-04 20:20:02 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-04 20:20:02 +0100
commitfce5cce5fdc7bd265eb023dfc0fc1accbe5a796e (patch)
treec745b76fc01ff7fa8c38c5810682c8878ade1fc1 /test/core/model/TestDocumentBuilder.hpp
parente76f58e912bd6661ba755d27da97bebf711f06ad (diff)
set non-empty default field name.
Diffstat (limited to 'test/core/model/TestDocumentBuilder.hpp')
-rw-r--r--test/core/model/TestDocumentBuilder.hpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/core/model/TestDocumentBuilder.hpp b/test/core/model/TestDocumentBuilder.hpp
index 71b353d..05b27b7 100644
--- a/test/core/model/TestDocumentBuilder.hpp
+++ b/test/core/model/TestDocumentBuilder.hpp
@@ -133,8 +133,8 @@ Rooted<StructuredEntity> buildRootStructuredEntity(Handle<Document> document,
*/
Rooted<StructuredEntity> buildStructuredEntity(
Handle<Document> document, Logger &logger, Handle<StructuredEntity> parent,
- Path path, const std::string &fieldName = "", Variant attributes = {},
- std::string name = "")
+ Path path, const std::string &fieldName = DEFAULT_FIELD_NAME,
+ Variant attributes = {}, std::string name = "")
{
// If the input handles are not set, we can not build the entity.
if (parent == nullptr) {
@@ -152,7 +152,7 @@ Rooted<StructuredEntity> buildStructuredEntity(
if (descriptor == nullptr) {
return {nullptr};
}
- if(!descriptor->isa(RttiTypes::StructuredClass)){
+ if (!descriptor->isa(RttiTypes::StructuredClass)) {
return {nullptr};
logger.error("The descriptor was not an AnnotationClass!");
}
@@ -184,11 +184,12 @@ Rooted<StructuredEntity> buildStructuredEntity(
* input handle was empty or the given domains did not
* contain a AnnotationClass with the given name.
*/
-Rooted<AnnotationEntity> buildAnnotationEntity(
- Handle<Document> document, Logger &logger, const Path &path,
- Handle<Anchor> start,
- Handle<Anchor> end, Variant attributes = {},
- std::string name = "")
+Rooted<AnnotationEntity> buildAnnotationEntity(Handle<Document> document,
+ Logger &logger, const Path &path,
+ Handle<Anchor> start,
+ Handle<Anchor> end,
+ Variant attributes = {},
+ std::string name = "")
{
// If the input handles are not set, we can not build the entity.
if (document == nullptr) {
@@ -202,7 +203,7 @@ Rooted<AnnotationEntity> buildAnnotationEntity(
if (descriptor == nullptr) {
return {nullptr};
}
- if(!descriptor->isa(RttiTypes::AnnotationClass)){
+ if (!descriptor->isa(RttiTypes::AnnotationClass)) {
return {nullptr};
logger.error("The descriptor was not an AnnotationClass!");
}