From fce5cce5fdc7bd265eb023dfc0fc1accbe5a796e Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Wed, 4 Feb 2015 20:20:02 +0100 Subject: set non-empty default field name. --- test/core/model/TestDocumentBuilder.hpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'test/core/model/TestDocumentBuilder.hpp') 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 buildRootStructuredEntity(Handle document, */ Rooted buildStructuredEntity( Handle document, Logger &logger, Handle 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 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 buildStructuredEntity( * input handle was empty or the given domains did not * contain a AnnotationClass with the given name. */ -Rooted buildAnnotationEntity( - Handle document, Logger &logger, const Path &path, - Handle start, - Handle end, Variant attributes = {}, - std::string name = "") +Rooted buildAnnotationEntity(Handle document, + Logger &logger, const Path &path, + Handle start, + Handle 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 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!"); } -- cgit v1.2.3