From f6b22312127f29f71aa26ca28142ad3e5f193445 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Tue, 3 Mar 2015 15:54:14 +0100 Subject: Do not allow structs to be transparent and root at the same time --- test/core/model/OntologyTest.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/core/model/OntologyTest.cpp b/test/core/model/OntologyTest.cpp index 265e9e2..c6e0596 100644 --- a/test/core/model/OntologyTest.cpp +++ b/test/core/model/OntologyTest.cpp @@ -336,11 +336,11 @@ TEST(Descriptor, pathToCycles) // Construct the ontology Rooted ontology{new Ontology(mgr, sys, "cycles")}; Rooted A{new StructuredClass( - mgr, "A", ontology, Cardinality::any(), {nullptr}, true, true)}; + mgr, "A", ontology, Cardinality::any(), {nullptr}, true, false)}; A->addSubclass(A, logger); ASSERT_FALSE(ontology->validate(logger)); Rooted B{new StructuredClass( - mgr, "B", ontology, Cardinality::any(), {nullptr}, false, true)}; + mgr, "B", ontology, Cardinality::any(), {nullptr}, true, false)}; Rooted A_field = A->createFieldDescriptor(logger).first; A_field->addChild(B); /* @@ -444,7 +444,7 @@ TEST(Descriptor, getDefaultFieldsCycles) // Construct the ontology Rooted ontology{new Ontology(mgr, sys, "cycles")}; Rooted A{new StructuredClass( - mgr, "A", ontology, Cardinality::any(), {nullptr}, true, true)}; + mgr, "A", ontology, Cardinality::any(), {nullptr}, true, false)}; A->addSubclass(A, logger); ASSERT_FALSE(ontology->validate(logger)); Rooted A_field = @@ -504,7 +504,7 @@ TEST(Descriptor, getPermittedChildrenCycles) // Construct the ontology Rooted ontology{new Ontology(mgr, sys, "cycles")}; Rooted A{new StructuredClass( - mgr, "A", ontology, Cardinality::any(), {nullptr}, true, true)}; + mgr, "A", ontology, Cardinality::any(), {nullptr}, true, false)}; A->addSubclass(A, logger); ASSERT_FALSE(ontology->validate(logger)); Rooted A_field = A->createFieldDescriptor(logger).first; @@ -529,7 +529,7 @@ TEST(Descriptor, getSyntaxDescriptor) // Construct the ontology Rooted ontology{new Ontology(mgr, sys, "ontology")}; Rooted A{new StructuredClass( - mgr, "A", ontology, Cardinality::any(), {nullptr}, true, true)}; + mgr, "A", ontology, Cardinality::any(), {nullptr}, false, false)}; A->setStartToken(TokenDescriptor(Tokens::Indent)); A->setEndToken(TokenDescriptor(Tokens::Dedent)); { @@ -558,7 +558,7 @@ TEST(Descriptor, getPermittedTokens) Rooted ontology{new Ontology(mgr, sys, "ontology")}; // add one StructuredClass with all tokens set. Rooted A{new StructuredClass( - mgr, "A", ontology, Cardinality::any(), {nullptr}, true, true)}; + mgr, "A", ontology, Cardinality::any(), {nullptr}, false, false)}; A->setStartToken(TokenDescriptor(Tokens::Indent)); A->setEndToken(TokenDescriptor(Tokens::Dedent)); { @@ -795,7 +795,7 @@ TEST(Ontology, getAllTokenDescriptors) Rooted ontology{new Ontology(mgr, sys, "ontology")}; // add one StructuredClass with all tokens set. Rooted A{new StructuredClass( - mgr, "A", ontology, Cardinality::any(), {nullptr}, true, true)}; + mgr, "A", ontology, Cardinality::any(), {nullptr}, false, false)}; A->setStartToken(TokenDescriptor(Tokens::Indent)); A->setEndToken(TokenDescriptor(Tokens::Dedent)); { -- cgit v1.2.3