summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-03-03 15:54:14 +0100
committerAndreas Stöckel <andreas@somweyr.de>2015-03-03 15:54:14 +0100
commitf6b22312127f29f71aa26ca28142ad3e5f193445 (patch)
treef499d0d5414bcec2d03904ff078a7acbefcedf42 /test
parente1f71b37d632418390b2aac2f89c9d05297a413c (diff)
Do not allow structs to be transparent and root at the same time
Diffstat (limited to 'test')
-rw-r--r--test/core/model/OntologyTest.cpp14
1 files changed, 7 insertions, 7 deletions
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> ontology{new Ontology(mgr, sys, "cycles")};
Rooted<StructuredClass> 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<StructuredClass> B{new StructuredClass(
- mgr, "B", ontology, Cardinality::any(), {nullptr}, false, true)};
+ mgr, "B", ontology, Cardinality::any(), {nullptr}, true, false)};
Rooted<FieldDescriptor> A_field = A->createFieldDescriptor(logger).first;
A_field->addChild(B);
/*
@@ -444,7 +444,7 @@ TEST(Descriptor, getDefaultFieldsCycles)
// Construct the ontology
Rooted<Ontology> ontology{new Ontology(mgr, sys, "cycles")};
Rooted<StructuredClass> 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<FieldDescriptor> A_field =
@@ -504,7 +504,7 @@ TEST(Descriptor, getPermittedChildrenCycles)
// Construct the ontology
Rooted<Ontology> ontology{new Ontology(mgr, sys, "cycles")};
Rooted<StructuredClass> 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<FieldDescriptor> A_field = A->createFieldDescriptor(logger).first;
@@ -529,7 +529,7 @@ TEST(Descriptor, getSyntaxDescriptor)
// Construct the ontology
Rooted<Ontology> ontology{new Ontology(mgr, sys, "ontology")};
Rooted<StructuredClass> 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> ontology{new Ontology(mgr, sys, "ontology")};
// add one StructuredClass with all tokens set.
Rooted<StructuredClass> 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> ontology{new Ontology(mgr, sys, "ontology")};
// add one StructuredClass with all tokens set.
Rooted<StructuredClass> 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));
{