summaryrefslogtreecommitdiff
path: root/test/core/model/DocumentTest.cpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-03-04 14:48:23 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-03-04 14:48:23 +0100
commit105c6082983a0c9dc4f1379fbcee3bcacc830472 (patch)
tree889ec1ad1b8a3e043108a63b4b2e8d12046ff66d /test/core/model/DocumentTest.cpp
parentc6fc25cf500d3f7d4bb855c4225f386736f2ebf9 (diff)
massively reworked demo html output.
Diffstat (limited to 'test/core/model/DocumentTest.cpp')
-rw-r--r--test/core/model/DocumentTest.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/core/model/DocumentTest.cpp b/test/core/model/DocumentTest.cpp
index 8ae9475..135ba19 100644
--- a/test/core/model/DocumentTest.cpp
+++ b/test/core/model/DocumentTest.cpp
@@ -249,7 +249,8 @@ TEST(Document, construct)
TEST(Document, validate)
{
// Let's start with a trivial ontology and a trivial document.
- TerminalLogger logger{std::cerr, true};
+// TerminalLogger logger{std::cerr, true};
+ Logger logger;
Manager mgr{1};
Rooted<SystemTypesystem> sys{new SystemTypesystem(mgr)};
Rooted<Ontology> ontology{new Ontology(mgr, sys, "trivial")};
@@ -403,7 +404,7 @@ TEST(Document, validate)
new AnnotationClass(mgr, "anno", ontology)};
{
/*
- * Create a valid document in itself.
+ * Create a document with anchors.
*/
Rooted<Document> doc{new Document(mgr, "myDoc.oxd")};
doc->referenceOntology(ontology);
@@ -416,7 +417,8 @@ TEST(Document, validate)
new DocumentPrimitive(mgr, child, {2}, "int")};
Rooted<Anchor> end{new Anchor(mgr, root)};
ASSERT_EQ(ValidationState::UNKNOWN, doc->getValidationState());
- ASSERT_TRUE(doc->validate(logger));
+ // This should be invalid due to disconnected Anchors
+ ASSERT_FALSE(doc->validate(logger));
// then add an AnnotationEntity without Anchors.
Rooted<AnnotationEntity> anno =
buildAnnotationEntity(doc, logger, {"anno"}, nullptr, nullptr);