diff options
Diffstat (limited to 'test/core/model')
-rw-r--r-- | test/core/model/TestDocumentBuilder.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/core/model/TestDocumentBuilder.hpp b/test/core/model/TestDocumentBuilder.hpp index a1c8dde..a09b081 100644 --- a/test/core/model/TestDocumentBuilder.hpp +++ b/test/core/model/TestDocumentBuilder.hpp @@ -155,6 +155,10 @@ Rooted<StructuredEntity> buildStructuredEntity( if (descriptor == nullptr) { return {nullptr}; } + if(!descriptor->isa(RttiTypes::StructuredClass)){ + return {nullptr}; + logger.error("The descriptor was not an AnnotationClass!"); + } // Then construct the StructuredEntity itself. Rooted<StructuredEntity> entity{new StructuredEntity( parent->getManager(), parent, descriptor.cast<StructuredClass>(), @@ -283,6 +287,10 @@ Rooted<AnnotationEntity> buildAnnotationEntity( if (descriptor == nullptr) { return {nullptr}; } + if(!descriptor->isa(RttiTypes::AnnotationClass)){ + return {nullptr}; + logger.error("The descriptor was not an AnnotationClass!"); + } // Then construct the AnnotationEntity itself Rooted<AnnotationEntity> anno{new AnnotationEntity( document->getManager(), document, descriptor.cast<AnnotationClass>(), |