summaryrefslogtreecommitdiff
path: root/test/core/model/TestDocumentBuilder.hpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-12 15:59:46 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-12 15:59:46 +0100
commit9d89642e2bc33b8630e92d8b5a0e6d4116040897 (patch)
treed7d18cf795a18e321ce255b0e456c60bf2839787 /test/core/model/TestDocumentBuilder.hpp
parent51de9238ddbd6b7f4cdaa5e9a5918cae952891b2 (diff)
some further trials to solve the issue of segfault in HTML test, but failed.
Diffstat (limited to 'test/core/model/TestDocumentBuilder.hpp')
-rw-r--r--test/core/model/TestDocumentBuilder.hpp8
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>(),